[Python-checkins] r45622 - python/trunk/Tools/pybench/Arithmetic.py python/trunk/Tools/pybench/Calls.py python/trunk/Tools/pybench/CommandLine.py python/trunk/Tools/pybench/Constructs.py python/trunk/Tools/pybench/Dict.py python/trunk/Tools/pybench/Exceptions.py python/trunk/Tools/pybench/Imports.py python/trunk/Tools/pybench/Instances.py python/trunk/Tools/pybench/Lists.py python/trunk/Tools/pybench/Lookups.py python/trunk/Tools/pybench/Numbers.py python/trunk/Tools/pybench/Strings.py python/trunk/Tools/pybench/Tuples.py python/trunk/Tools/pybench/Unicode.py python/trunk/Tools/pybench/pybench.py (original) (raw)

tim.peters python-checkins at python.org
Fri Apr 21 18:34:55 CEST 2006


Author: tim.peters Date: Fri Apr 21 18:34:54 2006 New Revision: 45622

Modified: python/trunk/Tools/pybench/Arithmetic.py python/trunk/Tools/pybench/Calls.py python/trunk/Tools/pybench/CommandLine.py python/trunk/Tools/pybench/Constructs.py python/trunk/Tools/pybench/Dict.py python/trunk/Tools/pybench/Exceptions.py python/trunk/Tools/pybench/Imports.py python/trunk/Tools/pybench/Instances.py python/trunk/Tools/pybench/Lists.py python/trunk/Tools/pybench/Lookups.py python/trunk/Tools/pybench/Numbers.py python/trunk/Tools/pybench/Strings.py python/trunk/Tools/pybench/Tuples.py python/trunk/Tools/pybench/Unicode.py python/trunk/Tools/pybench/pybench.py Log: Whitespace normalization.

Modified: python/trunk/Tools/pybench/Arithmetic.py

--- python/trunk/Tools/pybench/Arithmetic.py (original) +++ python/trunk/Tools/pybench/Arithmetic.py Fri Apr 21 18:34:54 2006 @@ -775,4 +775,3 @@ for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/Calls.py

--- python/trunk/Tools/pybench/Calls.py (original) +++ python/trunk/Tools/pybench/Calls.py Fri Apr 21 18:34:54 2006 @@ -407,4 +407,3 @@ for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/CommandLine.py

--- python/trunk/Tools/pybench/CommandLine.py (original) +++ python/trunk/Tools/pybench/CommandLine.py Fri Apr 21 18:34:54 2006 @@ -7,7 +7,7 @@ TODO: * Incorporate the changes made by (see Inbox) - * Add number range option using srange() + * Add number range option using srange() """ @@ -194,7 +194,7 @@ """ Option that takes an argument. An optional default argument can be given.

@@ -299,7 +299,7 @@ values = None # Dictionary of passed options (or default values) # indexed by the options name, e.g. '-h' files = None # List of passed filenames - optionlist = None # List of passed options + optionlist = None # List of passed options def init(self,argv=None): @@ -318,15 +318,15 @@ # Init .arguments list self.arguments = argv[1:]

@@ -336,12 +336,12 @@ rc = self.startup() if rc is not None: raise SystemExit,rc

@@ -375,7 +375,7 @@ Note that this has to be done before .parse() is being executed.

@@ -481,10 +481,10 @@ This may modify filelist in place. A typical application is checking that at least n files are given.

@@ -554,19 +554,19 @@ """ This may process the files list in place. """ return None

@@ -607,7 +607,7 @@ it is None, 0 is assumed (meaning OK). Unhandled exceptions are reported with exit status code 1 (see init for further details).

@@ -620,7 +620,7 @@ header = 'Test Application' version = version options = [Option('-v','verbose')]

Modified: python/trunk/Tools/pybench/Constructs.py

--- python/trunk/Tools/pybench/Constructs.py (original) +++ python/trunk/Tools/pybench/Constructs.py Fri Apr 21 18:34:54 2006 @@ -562,4 +562,3 @@ l1 = range(1000) for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/Dict.py

--- python/trunk/Tools/pybench/Dict.py (original) +++ python/trunk/Tools/pybench/Dict.py Fri Apr 21 18:34:54 2006 @@ -93,70 +93,70 @@ d['jkl'] = 4 d['mno'] = 5 d['pqr'] = 6

@@ -182,70 +182,70 @@ d[4.567] = 4 d[5.678] = 5 d[6.789] = 6

@@ -271,70 +271,70 @@ d[4] = 4 d[5] = 5 d[6] = 6

@@ -360,7 +360,7 @@ d[3] = 3 d[4] = 4 d[5] = 5

@@ -388,7 +388,7 @@ d[3] = 3 d[4] = 4 d[5] = 5

@@ -416,7 +416,7 @@ d[3] = 3 d[4] = 4 d[5] = 5

@@ -444,7 +444,7 @@ d[3] = 3 d[4] = 4 d[5] = 5

@@ -472,7 +472,7 @@ d[3] = 3 d[4] = 4 d[5] = 5

@@ -500,4 +500,3 @@ for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/Exceptions.py

--- python/trunk/Tools/pybench/Exceptions.py (original) +++ python/trunk/Tools/pybench/Exceptions.py Fri Apr 21 18:34:54 2006 @@ -38,7 +38,7 @@ for i in xrange(self.rounds): pass

class TryExcept(Test): @@ -677,5 +677,3 @@ for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/Imports.py

--- python/trunk/Tools/pybench/Imports.py (original) +++ python/trunk/Tools/pybench/Imports.py Fri Apr 21 18:34:54 2006 @@ -47,7 +47,7 @@ for i in xrange(self.rounds): pass

class SecondPackageImport(Test): @@ -92,7 +92,7 @@ for i in xrange(self.rounds): pass

@@ -136,4 +136,3 @@ for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/Instances.py

--- python/trunk/Tools/pybench/Instances.py (original) +++ python/trunk/Tools/pybench/Instances.py Fri Apr 21 18:34:54 2006 @@ -64,5 +64,3 @@ for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/Lists.py

--- python/trunk/Tools/pybench/Lists.py (original) +++ python/trunk/Tools/pybench/Lists.py Fri Apr 21 18:34:54 2006 @@ -25,7 +25,7 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -46,7 +46,7 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -67,7 +67,7 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -88,7 +88,7 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -109,7 +109,7 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -190,11 +190,11 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -212,11 +212,11 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -234,11 +234,11 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -256,11 +256,11 @@ l[3] = 3 l[4] = 4 l[5] = 5

@@ -278,15 +278,14 @@ l[3] = 3 l[4] = 4 l[5] = 5

Modified: python/trunk/Tools/pybench/Lookups.py

--- python/trunk/Tools/pybench/Lookups.py (original) +++ python/trunk/Tools/pybench/Lookups.py Fri Apr 21 18:34:54 2006 @@ -943,4 +943,3 @@ for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/Numbers.py

--- python/trunk/Tools/pybench/Numbers.py (original) +++ python/trunk/Tools/pybench/Numbers.py Fri Apr 21 18:34:54 2006 @@ -15,55 +15,55 @@ 2 == 3 2 > 3 2 < 3

@@ -75,55 +75,55 @@ 2 == 3 2 > 3 2 < 3

@@ -135,55 +135,55 @@ 2 == 3 2 > 3 2 < 3

@@ -211,55 +211,55 @@ 2.1 == 3.31 2.1 > 3.31 2.1 < 3.31

@@ -271,55 +271,55 @@ 2.1 == 3.31 2.1 > 3.31 2.1 < 3.31

@@ -331,55 +331,55 @@ 2.1 == 3.31 2.1 > 3.31 2.1 < 3.31

@@ -407,55 +407,55 @@ 2.1 == 4 2.1 > 4 2.1 < 4

@@ -467,55 +467,55 @@ 2.1 == 4 2.1 > 4 2.1 < 4

@@ -527,55 +527,55 @@ 2.1 == 4 2.1 > 4 2.1 < 4

@@ -603,55 +603,55 @@ 1234567890L == 3456789012345L 1234567890L > 3456789012345L 1234567890L < 3456789012345L

@@ -663,55 +663,55 @@ 1234567890L == 3456789012345L 1234567890L > 3456789012345L 1234567890L < 3456789012345L

@@ -723,55 +723,55 @@ 1234567890L == 3456789012345L 1234567890L > 3456789012345L 1234567890L < 3456789012345L

Modified: python/trunk/Tools/pybench/Strings.py

--- python/trunk/Tools/pybench/Strings.py (original) +++ python/trunk/Tools/pybench/Strings.py Fri Apr 21 18:34:54 2006 @@ -81,7 +81,7 @@ for i in xrange(self.rounds): pass

class CompareStrings(Test): @@ -163,7 +163,7 @@ for i in xrange(self.rounds): pass

class CompareInternedStrings(Test): @@ -245,7 +245,7 @@ for i in xrange(self.rounds): pass

class CreateStringsWithConcat(Test): @@ -320,7 +320,7 @@ for i in xrange(self.rounds): pass

class StringSlicing(Test): @@ -334,45 +334,45 @@ for i in xrange(self.rounds): - s[50:] - s[:25] - s[50:55] - s[-1:] - s[:1] - s[2:] - s[11:-11]

@@ -560,5 +560,3 @@ for i in xrange(self.rounds): s = data[i % len_data]

Modified: python/trunk/Tools/pybench/Tuples.py

--- python/trunk/Tools/pybench/Tuples.py (original) +++ python/trunk/Tools/pybench/Tuples.py Fri Apr 21 18:34:54 2006 @@ -265,7 +265,7 @@ t = tuple(range(100)) for j in r:

@@ -362,4 +362,3 @@ for i in xrange(self.rounds): pass

Modified: python/trunk/Tools/pybench/Unicode.py

--- python/trunk/Tools/pybench/Unicode.py (original) +++ python/trunk/Tools/pybench/Unicode.py Fri Apr 21 18:34:54 2006 @@ -86,7 +86,7 @@ for i in xrange(self.rounds): pass

class CompareUnicode(Test): @@ -168,7 +168,7 @@ for i in xrange(self.rounds): pass

class CreateUnicodeWithConcat(Test): @@ -243,7 +243,7 @@ for i in xrange(self.rounds): pass

class UnicodeSlicing(Test): @@ -303,7 +303,7 @@ for i in xrange(self.rounds): pass

@@ -318,7 +318,7 @@ t = join(map(unichr,range(100)),'') u = join(map(unichr,range(500)),'') v = join(map(unichr,range(1000)),'')

@@ -375,7 +375,7 @@ t = join(map(unichr,range(100)),'') u = join(map(unichr,range(500)),'') v = join(map(unichr,range(1000)),'')

@@ -389,7 +389,7 @@ data = (u'abc', u'123', u' ', u'\u1234\u2345\u3456', u'\uFFFF'*10) len_data = len(data)

@@ -447,7 +447,7 @@ data = (u'abc', u'123', u' ', u'\u1234\u2345\u3456', u'\uFFFF'*10) len_data = len(data)

Modified: python/trunk/Tools/pybench/pybench.py

--- python/trunk/Tools/pybench/pybench.py (original) +++ python/trunk/Tools/pybench/pybench.py Fri Apr 21 18:34:54 2006 @@ -38,7 +38,7 @@ version = '1.3' # -# NOTE: Use xrange for all test loops unless you want to face +# NOTE: Use xrange for all test loops unless you want to face # a 20MB process ! # # All tests should have rounds set to values so that a run() @@ -85,7 +85,7 @@ # for comparisons of benchmark runs - tests with unequal version # number will not get compared. version = 1.0

@@ -129,7 +129,7 @@ """ Run the test in two phases: first calibrate, then do the actual test. Be careful to keep the calibration timing low w/r to the test timing.

@@ -144,7 +144,7 @@ offset = offset + t offset = offset / cruns # now the real thing - t = clock() + t = clock() test() t = clock() - t self.last_timing = (t-offset,t,offset) @@ -152,32 +152,32 @@ def calibrate(self): - """ Calibrate the test. + """ Calibrate the test. - This method should execute everything that is needed to - setup and run the test - except for the actual operations - that you intend to measure. pybench uses this method to - measure the test implementation overhead. + This method should execute everything that is needed to + setup and run the test - except for the actual operations + that you intend to measure. pybench uses this method to + measure the test implementation overhead. """ return def test(self): - """ Run the test. + """ Run the test. - The test needs to run self.rounds executing - self.operations number of operations each. + The test needs to run self.rounds executing + self.operations number of operations each. """ # do some tests return

@@ -210,7 +210,7 @@ roundtime = 0 # Average round time version = None # Benchmark version number (see init) # as float x.yy - starttime = None # Benchmark start time + starttime = None # Benchmark start time def init(self): @@ -254,7 +254,7 @@ print self.roundtime = (clock() - roundtime) / self.rounds print

@@ -380,7 +380,7 @@ hidenoise = self.values['-d'] warp = self.values['-w'] nogc = self.values['--no-gc']

@@ -407,7 +407,7 @@ compare_to = bench except IOError: print '* Error opening/reading file',compare_to



More information about the Python-checkins mailing list