diff options
| -rwxr-xr-x | baseline/summarize-uwss.py | 31 | ||||
| -rwxr-xr-x | baseline/summarize-uwss2.py | 35 | ||||
| -rwxr-xr-x | baseline/summarize-wss.py | 20 | ||||
| -rwxr-xr-x | baseline/summarize.py | 34 | ||||
| -rwxr-xr-x | baseline/traffic_reroute.sh | 5 |
5 files changed, 125 insertions, 0 deletions
diff --git a/baseline/summarize-uwss.py b/baseline/summarize-uwss.py new file mode 100755 index 0000000..f7df269 --- /dev/null +++ b/baseline/summarize-uwss.py | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #!/usr/bin/python3 | ||
| 2 | import sys | ||
| 3 | |||
| 4 | f = sys.argv[1] | ||
| 5 | res = [] | ||
| 6 | res.append({}) | ||
| 7 | res.append({}) | ||
| 8 | res.append({}) | ||
| 9 | SAMPLES = 500 | ||
| 10 | |||
| 11 | with open(f) as fp: | ||
| 12 | for line in fp: | ||
| 13 | s = line.split() | ||
| 14 | mode = int(s[0])-1 | ||
| 15 | if s[1] not in res[mode]: | ||
| 16 | res[mode][s[1]] = float(s[5]) | ||
| 17 | else: | ||
| 18 | if "finished" not in s[5]: | ||
| 19 | res[mode][s[1]] += float(s[5]) | ||
| 20 | else: | ||
| 21 | res[mode][s[1]] += float(s[7]) | ||
| 22 | |||
| 23 | print("Average times low:") | ||
| 24 | for r in res[0].keys(): | ||
| 25 | print(res[0][r]/SAMPLES) | ||
| 26 | print("Average times medium:") | ||
| 27 | for r in res[1].keys(): | ||
| 28 | print(res[1][r]/SAMPLES) | ||
| 29 | print("Average times high:") | ||
| 30 | for r in res[2].keys(): | ||
| 31 | print(res[2][r]/SAMPLES) | ||
diff --git a/baseline/summarize-uwss2.py b/baseline/summarize-uwss2.py new file mode 100755 index 0000000..bf3d3ea --- /dev/null +++ b/baseline/summarize-uwss2.py | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #!/usr/bin/python3 | ||
| 2 | import sys | ||
| 3 | |||
| 4 | f = sys.argv[1] | ||
| 5 | res = [] | ||
| 6 | res.append({}) | ||
| 7 | res.append({}) | ||
| 8 | res.append({}) | ||
| 9 | res.append({}) | ||
| 10 | SAMPLES = 50 | ||
| 11 | |||
| 12 | with open(f) as fp: | ||
| 13 | for line in fp: | ||
| 14 | s = line.split() | ||
| 15 | mode = int(s[0]) | ||
| 16 | if s[1] not in res[mode]: | ||
| 17 | res[mode][s[1]] = float(s[5]) | ||
| 18 | else: | ||
| 19 | if "finished" not in s[5]: | ||
| 20 | res[mode][s[1]] += float(s[5]) | ||
| 21 | else: | ||
| 22 | res[mode][s[1]] += float(s[7]) | ||
| 23 | |||
| 24 | print("Average times no:") | ||
| 25 | for r in res[0].keys(): | ||
| 26 | print(res[0][r]/SAMPLES) | ||
| 27 | print("Average times low:") | ||
| 28 | for r in res[1].keys(): | ||
| 29 | print(res[1][r]/SAMPLES) | ||
| 30 | print("Average times medium:") | ||
| 31 | for r in res[2].keys(): | ||
| 32 | print(res[2][r]/SAMPLES) | ||
| 33 | print("Average times high:") | ||
| 34 | for r in res[3].keys(): | ||
| 35 | print(res[3][r]/SAMPLES) | ||
diff --git a/baseline/summarize-wss.py b/baseline/summarize-wss.py new file mode 100755 index 0000000..e759f61 --- /dev/null +++ b/baseline/summarize-wss.py | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #!/usr/bin/python3 | ||
| 2 | import sys | ||
| 3 | |||
| 4 | f = sys.argv[1] | ||
| 5 | res = {} | ||
| 6 | SAMPLES = 0 | ||
| 7 | |||
| 8 | with open(f) as fp: | ||
| 9 | for line in fp: | ||
| 10 | s = line.split() | ||
| 11 | if s[0] not in res: | ||
| 12 | res[s[0]] = float(s[4]) | ||
| 13 | SAMPLES = 1 | ||
| 14 | else: | ||
| 15 | res[s[0]] += float(s[4]) | ||
| 16 | SAMPLES += 1 | ||
| 17 | |||
| 18 | print("Average times:") | ||
| 19 | for r in res.keys(): | ||
| 20 | print(res[r]/SAMPLES) | ||
diff --git a/baseline/summarize.py b/baseline/summarize.py new file mode 100755 index 0000000..82f82d9 --- /dev/null +++ b/baseline/summarize.py | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #!/usr/bin/python3 | ||
| 2 | import sys | ||
| 3 | |||
| 4 | f = sys.argv[1] | ||
| 5 | res = {} | ||
| 6 | mem_res = {} | ||
| 7 | memw_res = {} | ||
| 8 | samples = {} | ||
| 9 | |||
| 10 | with open(f) as fp: | ||
| 11 | for line in fp: | ||
| 12 | s = line.split() | ||
| 13 | if s[0] not in res: | ||
| 14 | print(s[0]) | ||
| 15 | res[s[0]] = int(s[5]) | ||
| 16 | mem_res[s[0]] = int(s[8]) | ||
| 17 | memw_res[s[0]] = int(s[9]) | ||
| 18 | samples[s[0]] =int(s[4]) | ||
| 19 | else: | ||
| 20 | res[s[0]] += int(s[5]) | ||
| 21 | mem_res[s[0]] += int(s[8]) | ||
| 22 | memw_res[s[0]] += int(s[9]) | ||
| 23 | |||
| 24 | print("Average times:") | ||
| 25 | for r in res.keys(): | ||
| 26 | print(res[r]/samples[r]) | ||
| 27 | |||
| 28 | print("Average memory read:") | ||
| 29 | for r in mem_res.keys(): | ||
| 30 | print(mem_res[r]/samples[r]) | ||
| 31 | |||
| 32 | print("Average memory write:") | ||
| 33 | for r in memw_res.keys(): | ||
| 34 | print(memw_res[r]/samples[r]) | ||
diff --git a/baseline/traffic_reroute.sh b/baseline/traffic_reroute.sh new file mode 100755 index 0000000..3eb12f9 --- /dev/null +++ b/baseline/traffic_reroute.sh | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | /tools/scu write filter_start_addr 0x30000000 | ||
| 3 | /tools/scu write filter_end_addr 0x40000000 | ||
| 4 | /tools/scu write address_filtering_enable 1 | ||
| 5 | echo "RT traffic routed to MPCORE1" | ||
