diff options
| author | leochanj105 <leochanj@live.unc.edu> | 2021-10-29 03:40:38 -0400 |
|---|---|---|
| committer | leochanj105 <leochanj@live.unc.edu> | 2021-10-29 03:40:38 -0400 |
| commit | 92df3dcae6747e4410574e7bf1f14dd1c07c3471 (patch) | |
| tree | fafe9dbe89a4f7f715eee72644b906e698af29dc /smt_analysis/libSMT.py | |
| parent | 895707a76ef3711474eb98c4358588a96926739f (diff) | |
tmp 10/29
Diffstat (limited to 'smt_analysis/libSMT.py')
| -rwxr-xr-x | smt_analysis/libSMT.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/smt_analysis/libSMT.py b/smt_analysis/libSMT.py index c0b5178..881ef07 100755 --- a/smt_analysis/libSMT.py +++ b/smt_analysis/libSMT.py | |||
| @@ -17,7 +17,7 @@ def assert_valid_input_files(names, on_fail): | |||
| 17 | # @returns max_res May of benchmark to maximum execution time among all samples for that benchmark | 17 | # @returns max_res May of benchmark to maximum execution time among all samples for that benchmark |
| 18 | def load_baseline(f): | 18 | def load_baseline(f): |
| 19 | # constants for columns of baseline data files | 19 | # constants for columns of baseline data files |
| 20 | TOTAL_NS = 5 | 20 | TOTAL_NS = 9 |
| 21 | BENCH_NAME = 0 | 21 | BENCH_NAME = 0 |
| 22 | SAMPLES = 4 | 22 | SAMPLES = 4 |
| 23 | 23 | ||
| @@ -65,8 +65,8 @@ def load_paired(file1, file2, benchmarkCount): | |||
| 65 | START_N = 6 # Start nanoseconds | 65 | START_N = 6 # Start nanoseconds |
| 66 | END_S = 7 # End seconds | 66 | END_S = 7 # End seconds |
| 67 | END_N = 8 # End nanoseconds | 67 | END_N = 8 # End nanoseconds |
| 68 | RUN_ID = 9 | 68 | RUN_ID = 10 |
| 69 | JOB_NUM = 10 | 69 | JOB_NUM = 11 |
| 70 | 70 | ||
| 71 | with open(file1) as f1: | 71 | with open(file1) as f1: |
| 72 | numJobs = int(f1.readline().split()[TRIALS]) | 72 | numJobs = int(f1.readline().split()[TRIALS]) |
| @@ -101,7 +101,9 @@ def load_paired(file1, file2, benchmarkCount): | |||
| 101 | end2 = int(lineArr2[END_S]) * 10**9 + int(lineArr2[END_N]) | 101 | end2 = int(lineArr2[END_S]) * 10**9 + int(lineArr2[END_N]) |
| 102 | maxEnd = max(end1, end2) | 102 | maxEnd = max(end1, end2) |
| 103 | # Time actually co-scheduled is minEnd - maxStart, but Sims uses a different model | 103 | # Time actually co-scheduled is minEnd - maxStart, but Sims uses a different model |
| 104 | time[bench1][bench2][job_idx] = maxEnd - minStart | 104 | #time[bench1][bench2][job_idx] = maxEnd - minStart |
| 105 | time[bench1][bench2][job_idx] = end1-minStart | ||
| 106 | time[bench2][bench1][job_idx] = end2-minStart | ||
| 105 | # Compute offset: if first job starts at t=0, when does second start? | 107 | # Compute offset: if first job starts at t=0, when does second start? |
| 106 | offset[bench1][bench2][job_idx] = abs(start2-start1) | 108 | offset[bench1][bench2][job_idx] = abs(start2-start1) |
| 107 | # Compute some running statistics | 109 | # Compute some running statistics |
