Add scripts
This commit is contained in:
parent
c625f480c0
commit
5897ff3fde
2 changed files with 31 additions and 0 deletions
20
scripts/format-data.py
Normal file
20
scripts/format-data.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
import sys
|
||||||
|
|
||||||
|
xp_id = sys.argv[1]
|
||||||
|
values = []
|
||||||
|
for line in sys.stdin:
|
||||||
|
values.append(int(line))
|
||||||
|
|
||||||
|
values = sorted(values)
|
||||||
|
lval = len(values)
|
||||||
|
if (len(values) == 0):
|
||||||
|
print("No values for "+xp_id, file=sys.stderr)
|
||||||
|
sys.exit(0)
|
||||||
|
print(xp_id+",min,"+str(values[0]))
|
||||||
|
print(xp_id+",5th,"+str(values[int(5/100*lval)]))
|
||||||
|
print(xp_id+",25th,"+str(values[int(25/100*lval)]))
|
||||||
|
print(xp_id+",med,"+str(values[int(50/100*lval)]))
|
||||||
|
print(xp_id+",75th,"+str(values[int(75/100*lval)]))
|
||||||
|
print(xp_id+",95th,"+str(values[int(95/100*lval)]))
|
||||||
|
print(xp_id+",max,"+str(values[lval-1]))
|
11
scripts/generate_csv
Executable file
11
scripts/generate_csv
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "naive latencies global"
|
||||||
|
{ echo "delta" ; ls|grep xp1-|while read -r line; do cat $line/res/*.txt|grep -Po "\d*µs"|grep -Po "\d*"; done } > naive_latencies_global.csv
|
||||||
|
echo "naive latencies distri"
|
||||||
|
{ echo "hs,type,delta";ls|grep xp1-|while read -r line; do cat $line/res/*.txt|grep -Po "\d*µs"|grep -Po "\d*"|python3 ./format-data.py $line; done } > naive_latencies_distri.csv
|
||||||
|
|
||||||
|
echo "orig latencies global"
|
||||||
|
{ echo "delta" ; ls|grep xp2-|while read -r line; do cat $line/res/*.csv|grep -Po "\d*µs"|grep -Po "\d*"; done } > orig_latencies_global.csv
|
||||||
|
echo "orig latencies distri"
|
||||||
|
{ echo "hs,type,delta";ls|grep xp2-|while read -r line; do cat $line/res/*.csv|grep -Po "\d*µs"|grep -Po "\d*"|python3 ./format-data.py $line; done } > orig_latencies_distri.csv
|
Loading…
Reference in a new issue