Author: justi9
Date: 2008-08-26 09:40:49 -0400 (Tue, 26 Aug 2008)
New Revision: 2357
Modified:
mgmt/trunk/cumin/bin/cumin-bench
Log:
Add a calibration step to the cumin-bench profiling mode
Modified: mgmt/trunk/cumin/bin/cumin-bench
===================================================================
--- mgmt/trunk/cumin/bin/cumin-bench 2008-08-26 12:34:43 UTC (rev 2356)
+++ mgmt/trunk/cumin/bin/cumin-bench 2008-08-26 13:40:49 UTC (rev 2357)
@@ -69,6 +69,19 @@
prof = Profile()
+ print "Calibrating"
+
+ biases = list()
+
+ for i in range(5):
+ bias = prof.calibrate(100000)
+ biases.append(bias)
+ print i, bias
+
+ prof.bias = sum(biases) / float(5)
+
+ print "Using bias %f" % prof.bias
+
try:
statement = "do_main('%s', '%s', '%s', %i,
%r)" % \
(home, data, spec, hits, check_xml)
Show replies by date