From 0c2be2d9e3de91ab0a06ef6bbf9ef5d4328b8181 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Tue, 9 Mar 2021 19:35:53 -0500 Subject: Analysis Scripts: Cut deceptive help text and clean computeLCslowdown.py output --- smt_analysis/computeLCslowdown.py | 8 ++++---- smt_analysis/computeSMTslowdown.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/smt_analysis/computeLCslowdown.py b/smt_analysis/computeLCslowdown.py index bcd22da..b6ac3a3 100755 --- a/smt_analysis/computeLCslowdown.py +++ b/smt_analysis/computeLCslowdown.py @@ -8,7 +8,7 @@ ASYNC_FORMAT = False def print_usage(): print("This program takes in the all-pairs and baseline SMT data and computes the worst-case slowdown against any other task when SMT is enabled.", file=sys.stderr) - print("Level-A/B usage: {} ".format(sys.argv[0]), file=sys.stderr) +# print("Level-A/B usage: {} ".format(sys.argv[0]), file=sys.stderr) print("Level-C usage: {} ".format(sys.argv[0]), file=sys.stderr) # Check that we got the right number of parameters @@ -47,7 +47,7 @@ for i in range(0, len(name_to_idx)): reliableNames.append(benchmark) # Compute worst-case SMT slowdown for each benchmark -print("Bench Mi") +print("Bench M_i") # Print rows sample_f = np.mean # Change this to np.mean to use mean values in Mi generation M_vals = [] @@ -60,11 +60,11 @@ for b1 in reliableNames: time_wout_smt = sample_f(baseline_times[b1]) M = time_with_smt / time_wout_smt max_mi = max(max_mi, M) - print("{:>10.3}".format(max_mi), end=" ") + print("{:<1.3}".format(max_mi), end=" ") M_vals.append(max_mi) print("") # Print some statistics about the distribution -print("Average: {:>5.3} with standard deviation {:>5.3} using `{}`".format(np.mean(M_vals), np.std(M_vals), sample_f.__name__)) +print("Overall average is {:.3} with standard deviation {:>5.3} using `{}`".format(np.mean(M_vals), np.std(M_vals), sample_f.__name__)) Ms = np.asarray(M_vals, dtype=np.float32) print(np.sum(Ms <= 1), "of", len(M_vals), "M_i values are at most one -", 100*np.sum(Ms <= 1)/len(M_vals), "percent") print(np.sum(Ms > 2), "of", len(M_vals), "M_i values are greater than two -", 100*np.sum(Ms > 2)/len(M_vals), "percent") diff --git a/smt_analysis/computeSMTslowdown.py b/smt_analysis/computeSMTslowdown.py index ba9fa84..d612ea6 100755 --- a/smt_analysis/computeSMTslowdown.py +++ b/smt_analysis/computeSMTslowdown.py @@ -11,7 +11,7 @@ from libSMT import * def print_usage(): print("This program takes in the all-pairs and baseline SMT data and computes how much each program is slowed when SMT in enabled.", file=sys.stderr) print("Level-A/B usage: {} --cij".format(sys.argv[0]), file=sys.stderr) - print("Level-C usage: {} ".format(sys.argv[0]), file=sys.stderr) +# print("Level-C usage: {} ".format(sys.argv[0]), file=sys.stderr) # Check that we got the right number of parameters if len(sys.argv) < 3: -- cgit v1.2.2