diff options
author | Franklin Wei <me@fwei.tk> | 2018-07-10 19:55:07 +0000 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2018-07-10 19:55:07 +0000 |
commit | 1ad0b326b1d9f780b9189383bcc271e2b74b4358 (patch) | |
tree | 0269f843b68413f8c0ab78ec5bfe109e88919505 | |
parent | 26210992dc61b5b77972074c6da411de5bcce48e (diff) | |
download | csaa-1ad0b326b1d9f780b9189383bcc271e2b74b4358.zip csaa-1ad0b326b1d9f780b9189383bcc271e2b74b4358.tar.gz csaa-1ad0b326b1d9f780b9189383bcc271e2b74b4358.tar.bz2 csaa-1ad0b326b1d9f780b9189383bcc271e2b74b4358.tar.xz |
Produce graphs of dummy performance to compare with secure version
-rw-r--r-- | graph.gnu | 13 | ||||
-rw-r--r-- | postprocess.cpp | 4 | ||||
-rwxr-xr-x | tabulate.sh | 15 | ||||
-rwxr-xr-x | testmain.sh | 8 |
4 files changed, 28 insertions, 12 deletions
@@ -6,20 +6,23 @@ set terminal eps set output "graph_create.eps" -plot "results/final_data_create.txt" u 1:2:3 w yerrorbars ls 1 title "1 SE", '' u 1:2 w lines ls 1 title "Create"; +plot "results/final_data_create.txt" u 1:2:3 w yerrorbars ls 1 title "+/- 1.96 SE", '' u 1:2 w lines ls 2 title "Create", \ + "results/final_data_dummy_create.txt" u 1:2:3 w yerrorbars ls 3 title "+/- 1.96 SE", '' u 1:2 w lines ls 4 title "Dummy Create"; set output "graph_modify.eps" -plot "results/final_data_modify.txt" u 1:2:3 w yerrorbars ls 1 title "1 SE", '' u 1:2 w lines ls 1 title "Modify"; +plot "results/final_data_modify.txt" u 1:2:3 w yerrorbars ls 1 title "+/- 1.96 SE", '' u 1:2 w lines ls 2 title "Modify", \ + "results/final_data_dummy_modify.txt" u 1:2:3 w yerrorbars ls 3 title "+/- 1.96 SE", '' u 1:2 w lines ls 4 title "Dummy Modify"; set output "graph_retrieve.eps" -plot "results/final_data_retrieve.txt" u 1:2:3 w yerrorbars ls 1 title "1 SE", '' u 1:2 w lines ls 1 title "Retrieve"; +plot "results/final_data_retrieve.txt" u 1:2:3 w yerrorbars ls 1 title "+/- 1.96 SE", '' u 1:2 w lines ls 2 title "Retrieve", \ + "results/final_data_dummy_retrieve.txt" u 1:2:3 w yerrorbars ls 3 title "+/- 1.96 SE", '' u 1:2 w lines ls 4 title "Dummy Retrieve"; set output "graph_modifyenc.eps" -plot "results/final_data_modifyenc.txt" u 1:2:3 w yerrorbars ls 1 title "1 SE", '' u 1:2 w lines ls 1 title "Modify (encrypted)"; +plot "results/final_data_modifyenc.txt" u 1:2:3 w yerrorbars ls 1 title "+/- 1.96 SE", '' u 1:2 w lines ls 2 title "Modify (encrypted)"; set output "graph_retrieveenc.eps" -plot "results/final_data_retrieveenc.txt" u 1:2:3 w yerrorbars ls 1 title "1 SE", '' u 1:2 w lines ls 1 title "Retrieve (encrypted)"; +plot "results/final_data_retrieveenc.txt" u 1:2:3 w yerrorbars ls 1 title "+/- 1.96 SE", '' u 1:2 w lines ls 2 title "Retrieve (encrypted)"; diff --git a/postprocess.cpp b/postprocess.cpp index 2613bc6..1c2dd6f 100644 --- a/postprocess.cpp +++ b/postprocess.cpp @@ -60,7 +60,9 @@ int main() stderrs[i] = stddevs[i] / sqrt(counts[i]); - printf("%d %g %g\n", i, means[i], stderrs[i]); + /* 95% confidence interval */ + double z = 1.96; + printf("%d %g %g\n", i, means[i], z * stderrs[i]); } } } diff --git a/tabulate.sh b/tabulate.sh index f85a2cf..9ff2387 100755 --- a/tabulate.sh +++ b/tabulate.sh @@ -1,15 +1,21 @@ #!/bin/bash -for i in `seq 2 14` +for i in `seq 2 10` do rm -f all_"$i".txt - for j in `seq 1 4` + rm -f dummy_all_"$i".txt + for j in `seq 1 5` do echo -n "$i $j " >> all_"$i".txt + echo -n "$i $j " >> dummy_all_"$i".txt cat run_"$i"_"$j".txt | awk '/Elapsed/ || /Maximum/ || /User time/ || /System time/' | awk 'BEGIN{line=0}{if(line%4<=1)printf($4" ");if(line %4==2)printf($8" ");if(line%4==3)printf($6" ");}{line+=1}END{printf("\n");}' >> all_"$i".txt + + cat dummy_"$i"_"$j".txt | awk '/Elapsed/ || /Maximum/ || /User time/ || /System time/' | awk 'BEGIN{line=0}{if(line%4<=1)printf($4" ");if(line %4==2)printf($8" ");if(line%4==3)printf($6" ");}{line+=1}END{printf("\n");}' >> dummy_all_"$i".txt done done rm -f data_create.txt data_modify.txt data_retrieve.txt data_modifyenc.txt data_retrieveenc.txt +rm -f data_dummy_create.txt data_dummy_modify.txt data_dummy_retrieve.txt + cat all_*.txt | awk '{print $1, $5 >> "data_create.txt"; print $1, $9 >> "data_modify.txt" print $1, $13 >> "data_retrieve.txt" @@ -17,6 +23,11 @@ cat all_*.txt | awk '{print $1, $5 >> "data_create.txt"; print $1, $21 >> "data_retrieveenc.txt" }' +cat dummy_all_*.txt | awk '{print $1, $5 >> "data_dummy_create.txt"; + print $1, $9 >> "data_dummy_modify.txt"; + print $1, $13 >> "data_dummy_retrieve.txt"; +}' + for f in data*.txt do echo $f diff --git a/testmain.sh b/testmain.sh index c3b4651..8ea224e 100755 --- a/testmain.sh +++ b/testmain.sh @@ -1,8 +1,8 @@ #!/bin/bash mkdir -p results -trials=1 +trials=5 -for i in `seq 2 14` +for i in `seq 2 10` do echo "logleaves "$i @@ -16,7 +16,7 @@ do sleep .2 # dummy - #./testdummy.sh $i $runs 2> results/dummy_"$i"_"$j".txt - #sleep .2 + ./testdummy.sh $i $runs 2> results/dummy_"$i"_"$j".txt + sleep .2 done done |