Skip to content

Instantly share code, notes, and snippets.

@xor-freenet
Created September 15, 2015 13:37
Show Gist options
  • Save xor-freenet/33b7a17db0d3b80b842e to your computer and use it in GitHub Desktop.
Save xor-freenet/33b7a17db0d3b80b842e to your computer and use it in GitHub Desktop.
Gnuplot script for processing output of "wotutil.sh -benchmarkRemoveTrustDestructive ..."
file_old="WebOfTrust.benchmark.seed1.old.5052.gp"
file_new1="WebOfTrust.benchmark.seed1.issue5757.5052.gp"
file_new2="WebOfTrust.benchmark.seed1.issue6636.5052.gp"
set xlabel "Trust value count"
set ylabel "Time for removing a single Trust value (seconds)"
set terminal wxt size 800,600
stats file_old using 1 prefix "oldcodex"
stats file_old using 2 prefix "oldcode"
stats file_new1 using 1 prefix "newcode1x"
stats file_new1 using 2 prefix "newcode1"
stats file_new2 using 1 prefix "newcode2x"
stats file_new2 using 2 prefix "newcode2"
xmax = oldcodex_max + 75
ymax = oldcode_max * 1.1
set xrange [:xmax]
set yrange [:ymax]
performance_factor1 = oldcode_mean / newcode1_mean
performance_factor2 = oldcode_mean / newcode2_mean
set title "Issue 5757/6636 removeTrust() benchmark with real network dump:\n" \
."Identities: 11985 (Not fetched: 183), Trusts: 222122, Own Identities: 1\n" \
.sprintf("Performance improvement factor revision 1 (quotient of means): %g\n", performance_factor1) \
.sprintf("Performance improvement factor revision 2 (quotient of means): %g", performance_factor2)
set title offset 0, -0.5
set xlabel offset 0, 0.5
set ylabel offset 1, 0
plot file_old using 1:($2 <= ymax ? $2 : ymax) title sprintf("Old code (%i Samples, Mean: %g seconds)", oldcode_records, oldcode_mean) pointtype 1 pointsize 1 linewidth 0.5, \
file_new1 using 1:($2 <= ymax ? $2 : ymax) title sprintf("New code revision 1 (%i Samples, Mean: %g seconds)", newcode1_records, newcode1_mean) pointtype 2 pointsize 1 linewidth 1, \
file_new2 using 1:($2 <= ymax ? $2 : ymax) title sprintf("New code revision 2 (%i Samples, Mean: %g seconds)", newcode2_records, newcode2_mean) pointtype 6 pointsize 0.5 linewidth 0.33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment