diff --git a/src/benchmark/benchmark_generator.py b/src/benchmark/benchmark_generator.py index c972877..6dc0788 100644 --- a/src/benchmark/benchmark_generator.py +++ b/src/benchmark/benchmark_generator.py @@ -2,6 +2,7 @@ import argparse import json import time +import statistics import sys import torch @@ -45,7 +46,12 @@ def main() -> None: ) json.dump( - {"load_sec": load_sec, "synthesize_rtf": synthesize_rtf}, + { + "load_sec": load_sec, + "rtf_mean": statistics.mean(synthesize_rtf), + "rtf_stdev": statistics.stdev(synthesize_rtf), + "synthesize_rtf": synthesize_rtf, + }, sys.stdout, ) diff --git a/src/benchmark/benchmark_torchscript.py b/src/benchmark/benchmark_torchscript.py index 11cc51c..f1972df 100644 --- a/src/benchmark/benchmark_torchscript.py +++ b/src/benchmark/benchmark_torchscript.py @@ -2,6 +2,7 @@ import argparse import json import time +import statistics import sys import torch @@ -49,7 +50,12 @@ def main() -> None: ) json.dump( - {"load_sec": load_sec, "synthesize_rtf": synthesize_rtf}, + { + "load_sec": load_sec, + "rtf_mean": statistics.mean(synthesize_rtf), + "rtf_stdev": statistics.stdev(synthesize_rtf), + "synthesize_rtf": synthesize_rtf, + }, sys.stdout, )