You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ne...@apache.org on 2012/10/29 13:21:30 UTC

svn commit: r1403264 - /subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py

Author: neels
Date: Mon Oct 29 12:21:30 2012
New Revision: 1403264

URL: http://svn.apache.org/viewvc?rev=1403264&view=rev
Log:
Tweak benchmark suite1.

* tools/dev/benchmarks/suite1/benchmark.py
  (cmdline_compare): Reverse order on one line of output.
  (cmdline_chart_compare):
    Try to make chart creation xserver independent by using 'Agg'. Fix an
    item-deleting loop so that it keeps track of deletions.

Modified:
    subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py

Modified: subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py?rev=1403264&r1=1403263&r2=1403264&view=diff
==============================================================================
--- subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py (original)
+++ subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py Mon Oct 29 12:21:30 2012
@@ -925,7 +925,7 @@ def cmdline_compare(db, options, left_st
     print "No timings for", right_kind.label
     exit(1)
 
-  label = 'Compare %s to %s' % (left_kind.label, right_kind.label)
+  label = 'Compare %s to %s' % (right_kind.label, left_kind.label)
 
   s = [label]
 
@@ -975,8 +975,10 @@ def cmdline_compare(db, options, left_st
 # ------------------------------------------------------- charts
 
 def cmdline_chart_compare(db, options, *args):
+  import matplotlib
+  matplotlib.use('Agg')
   import numpy as np
-  import matplotlib.pyplot as plt
+  import matplotlib.pylab as plt
 
   labels = []
   timing_sets = []
@@ -993,9 +995,14 @@ def cmdline_chart_compare(db, options, *
     timing_sets.append(timings)
 
     if command_names:
-      for i in range(len(command_names)):
+      command_names_len = len(command_names)
+      i = 0
+      while i < command_names_len:
         if not command_names[i] in timings:
           del command_names[i]
+          command_names_len -= 1
+        else:
+          i += 1
     else:
       command_names = query.get_sorted_command_names()