From 504fc47341c2518c407ec29930a1773ed431e69a Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Sun, 28 Feb 2010 13:38:53 +0000 Subject: benchmark results: show repo sizes relative to data size --- diff --git a/benchmarks/gen-plots b/benchmarks/gen-plots index b86071e..9d6d43a 100755 --- a/benchmarks/gen-plots +++ b/benchmarks/gen-plots @@ -5,6 +5,7 @@ import sys opNames=["createRepo", "checkoutFirst", "commit", "checkoutIntermediate", "createBranch", "checkoutBranch", "commitBranch"] shortOpNames=["create", "checkout", "commit", "checkoutInterm.", "branch", "checkoutBr.", "commitBr."] multiOpNames=["commit", "checkoutFirst", "checkoutBranch", "commitBranch"] +dataSize=33443482 def formatInline(datum) : if isinstance(datum, unicode) : @@ -55,7 +56,7 @@ def genOpVsSizePlot(stats, ftype) : print "set xrange [-.5:3.6]" print "set yrange [0:]" print "set y2range [0:]" - print "set ylabel 'Repository size [MB]'" + print "set ylabel 'Repository size (relative)'" print "set xlabel 'Operation'" print "set style fill solid" print "set style histogram clustered gap 2" @@ -64,18 +65,20 @@ def genOpVsSizePlot(stats, ftype) : print "set xtics scale 0" print "set ytics nomirror" print "set y2tics" - print "plot "+",".join(["'-' using 1:xtic(2) with histograms title '%s'" % (vcs,) for vcs in vcsNames]) + print "plot "+",".join( + ["'-' using 1:xtic(2) with histograms title '%s'" % (vcs,) for vcs in vcsNames]+ + ["1 title 'input size'"]) for vcs in vcsNames : dset = stats[vcs] - printInlineData([(dset["repoSizeAfter"+lName[0].upper()+lName[1:]]/1024, lName) + printInlineData([(dset["repoSizeAfter"+lName[0].upper()+lName[1:]]*1024./dataSize, lName) for lName in opNames if not lName.startswith("checkout")]) for vcs in vcsNames : print "set style histogram clustered gap 1" print "set output 'output/op-vs-size-%s.%s'" % (vcs,ftype) - print "plot '-' using 1:xtic(2) with histograms title '%s'" % (vcs,) - printInlineData([(stats[vcs]["repoSizeAfter"+lName[0].upper()+lName[1:]]/1024, lName) + print "plot '-' using 1:xtic(2) with histograms title '%s', 1 title 'input size'" % (vcs,) + printInlineData([(stats[vcs]["repoSizeAfter"+lName[0].upper()+lName[1:]]*1024./dataSize, lName) for lName in opNames if not lName.startswith("checkout")]) @@ -106,13 +109,15 @@ def genTotalsPlot(stats, ftype) : printInlineData([(dset["totalTime"], "totalTime")]) print "set key outside right" - print "set ylabel 'Repository size [MB]'" + print "set ylabel 'Repository size (relative)'" print "set size 0.58,1" print "set origin 0.42,0" - print "plot "+",".join(["'-' using 1:xtic(2) with histograms title '%s'" % (vcs) for vcs in vcsNames]) + print "plot "+",".join( + ["'-' using 1:xtic(2) with histograms title '%s'" % (vcs) for vcs in vcsNames]+ + ["1 title 'input size'"]) for vcs in vcsNames : dset = stats[vcs] - printInlineData([(dset["repoSizeAfterTotal"]/1024, "repoSizeAfterTotal")]) + printInlineData([(dset["repoSizeAfterTotal"]*1024./dataSize, "repoSizeAfterTotal")]) print "unset multiplot" -- cgit v0.9.1