From 653c85b969aff73ff610d659d89279ba9c73f9dc Mon Sep 17 00:00:00 2001 From: Tonyhao96 <673665244@qq.com> Date: Mon, 17 Oct 2022 12:12:05 +0800 Subject: [PATCH] update --- simulation/simulator.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/simulation/simulator.py b/simulation/simulator.py index 1b1375f..d690b1d 100644 --- a/simulation/simulator.py +++ b/simulation/simulator.py @@ -103,17 +103,17 @@ def main(args): utils.cluster_concatenate(policy, args.placer, log_dir, args.trace_dir) else: utils.cluster_concatenate(args.scheduler, args.placer, log_dir, args.trace_dir) + utils.cluster_analysis(args.placer, log_dir, args.trace_dir) - utils.cluster_analysis(args.placer, log_dir, args.trace_dir) - logger.info(f"Execution Time: {round(time.perf_counter() - code_start, 2)}s") + """Fast query result""" + sched_label = args.scheduler + "_consolidate" + jct_df = pd.read_csv(f"{log_dir}/jct_avg_consolidate.csv", index_col=0) + jct = jct_df.at["all", sched_label] + que_df = pd.read_csv(f"{log_dir}/que_avg_consolidate.csv", index_col=0) + que = que_df.at["all", sched_label] + logger.info(f"Summary of {args.scheduler}: Avg. JCT {jct}s, Avg. Queue {que}s") - """Fast query result""" - sched_label = args.scheduler + "_consolidate" - jct_df = pd.read_csv(f"{log_dir}/jct_avg_consolidate.csv", index_col=0) - jct = jct_df.at["all", sched_label] - que_df = pd.read_csv(f"{log_dir}/que_avg_consolidate.csv", index_col=0) - que = que_df.at["all", sched_label] - logger.info(f"Summary of {args.scheduler}: Avg. JCT {jct}s, Avg. Queue {que}s") + logger.info(f"Execution Time: {round(time.perf_counter() - code_start, 2)}s") if __name__ == "__main__":