summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2020-05-29 12:56:36 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2020-05-29 12:56:36 -0400
commit7b715ab6c23af2695f58917ffe6e5df3b14ab360 (patch)
tree8ad92a96a3565ecbee37a49cf2beb47d15f7eb38
parent8dfefc152f16f9fd9e8aa0910fd4d23d6543d87e (diff)
Add remaining scripts from Joshua's PRP experimentsfor-jbakita-prp
***This is the final commit which supports reproducing his PRP results***
-rwxr-xr-xbaseline/summarize-uwss.py31
-rwxr-xr-xbaseline/summarize-uwss2.py35
-rwxr-xr-xbaseline/summarize-wss.py20
-rwxr-xr-xbaseline/summarize.py34
-rwxr-xr-xbaseline/traffic_reroute.sh5
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
2import sys
3
4f = sys.argv[1]
5res = []
6res.append({})
7res.append({})
8res.append({})
9SAMPLES = 500
10
11with 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
23print("Average times low:")
24for r in res[0].keys():
25 print(res[0][r]/SAMPLES)
26print("Average times medium:")
27for r in res[1].keys():
28 print(res[1][r]/SAMPLES)
29print("Average times high:")
30for 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
2import sys
3
4f = sys.argv[1]
5res = []
6res.append({})
7res.append({})
8res.append({})
9res.append({})
10SAMPLES = 50
11
12with 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
24print("Average times no:")
25for r in res[0].keys():
26 print(res[0][r]/SAMPLES)
27print("Average times low:")
28for r in res[1].keys():
29 print(res[1][r]/SAMPLES)
30print("Average times medium:")
31for r in res[2].keys():
32 print(res[2][r]/SAMPLES)
33print("Average times high:")
34for 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
2import sys
3
4f = sys.argv[1]
5res = {}
6SAMPLES = 0
7
8with 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
18print("Average times:")
19for 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
2import sys
3
4f = sys.argv[1]
5res = {}
6mem_res = {}
7memw_res = {}
8samples = {}
9
10with 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
24print("Average times:")
25for r in res.keys():
26 print(res[r]/samples[r])
27
28print("Average memory read:")
29for r in mem_res.keys():
30 print(mem_res[r]/samples[r])
31
32print("Average memory write:")
33for 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
5echo "RT traffic routed to MPCORE1"