Commit Graph

20 Commits

Author SHA1 Message Date
Georg Brandl d9ede202ea Merged revisions 83421,83424 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint

................
  r83421 | georg.brandl | 2010-08-01 20:52:52 +0200 (So, 01 Aug 2010) | 25 lines

  Merged revisions 83393,83396,83398,83405,83408 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/branches/py3k

  ........
    r83393 | georg.brandl | 2010-08-01 10:35:29 +0200 (So, 01 Aug 2010) | 1 line

    #1690103: fix initial namespace for code run with trace.main().
  ........
    r83396 | georg.brandl | 2010-08-01 10:52:32 +0200 (So, 01 Aug 2010) | 1 line

    #4810: document "--" option separator in timeit help.
  ........
    r83398 | georg.brandl | 2010-08-01 11:06:34 +0200 (So, 01 Aug 2010) | 1 line

    #8826: the "expires" attribute value is a date string with spaces, but apparently not all user-agents put it in quotes.  Handle that as a special case.
  ........
    r83405 | georg.brandl | 2010-08-01 16:38:17 +0200 (So, 01 Aug 2010) | 1 line

    #4943: do not try to include drive letters (and colons) when looking for a probably module name.
  ........
    r83408 | georg.brandl | 2010-08-01 17:30:56 +0200 (So, 01 Aug 2010) | 1 line

    #5551: symbolic links never can be mount points.  Fixes the fix for #1713.
  ........
................
  r83424 | georg.brandl | 2010-08-01 21:02:09 +0200 (So, 01 Aug 2010) | 29 lines

  Merged revisions 83385-83389,83391 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/branches/py3k

  ........
    r83385 | georg.brandl | 2010-08-01 08:42:45 +0200 (So, 01 Aug 2010) | 1 line

    #8773: mailbox.py does not need to be executable.
  ........
    r83386 | georg.brandl | 2010-08-01 08:44:46 +0200 (So, 01 Aug 2010) | 1 line

    #8768: name test method properly so that it gets executed.
  ........
    r83387 | georg.brandl | 2010-08-01 08:53:28 +0200 (So, 01 Aug 2010) | 1 line

    #8735: better explain semantics of *values* argument for parse().
  ........
    r83388 | georg.brandl | 2010-08-01 09:48:43 +0200 (So, 01 Aug 2010) | 1 line

    #7395: fix traceback in do_add() when no stats are loaded.  Apply same fix for do_sort() and do_reverse().
  ........
    r83389 | georg.brandl | 2010-08-01 09:57:47 +0200 (So, 01 Aug 2010) | 1 line

    Small improvements to pstats browser: do not crash on reading invalid file, and actually do a reload when executing "read" as intended.
  ........
    r83391 | georg.brandl | 2010-08-01 10:10:08 +0200 (So, 01 Aug 2010) | 1 line

    Add another news entry.
  ........
................
2010-08-01 22:13:33 +00:00
Raymond Hettinger d7b009e991 Localize the function lookup in timeit. 2009-04-03 02:47:57 +00:00
Neal Norwitz 0d4c06e06e Whitespace normalization. Ugh, we really need to do this more often.
You might want to review this change as it's my first time.  Be gentle. :-)
2007-04-25 06:30:05 +00:00
Georg Brandl d9bef35e3c Patch #1533909: the timeit module now accepts callables in addition to
strings for the code to time and the setup code. Also added two
convenience functions for instantiating a Timer and calling its methods.
2007-03-13 19:32:21 +00:00
Raymond Hettinger 816ed1b0bd SF patch #868736: Disable GC for timeit
Make timings more consistent by temporarily disabling GC.
2004-01-04 03:47:51 +00:00
Guido van Rossum 571720811b Show microseconds, milliseconds or seconds, whichever is most natural,
rather than showing weird numbers like 8.4e+03 usec.
2003-10-20 23:38:28 +00:00
Martin v. Löwis 7bdc484c97 Patch #808362: Fix typos. 2003-09-20 11:09:28 +00:00
Neal Norwitz c556722f09 remove unused import math 2003-06-29 04:18:15 +00:00
Raymond Hettinger 22952a3efc SF bug 735293: Command line timeit.py sets sys.path badly
Paul Moore's patch to have timeit.py check the current directory for
imports (instead of the directory for Lib/timeit.py).
2003-05-20 04:59:56 +00:00
Skip Montanaro cfd55501bb add a #! line for unix weenies 2003-04-08 19:49:40 +00:00
Skip Montanaro fb2a6ccfc4 correct a couple docstring nits 2003-04-08 19:40:19 +00:00
Guido van Rossum dd42edcc9d Rename variables _seq to _it and seq to it, to emphasize that this is
an iterator (which can only be used once!).
2003-03-21 14:54:19 +00:00
Guido van Rossum 0070f007f4 Change the default number of repetitions to 3, both in the Timer class
(from 10) and in main() (from 1).

Add a -v option that shows the raw times.  Repeating it cranks up the
display precision.

Always use the "best of N" form of output.
2003-03-15 12:25:00 +00:00
Guido van Rossum 538f1d842c Implement some recommendations from Raymond H:
- Make all local variables in the template start with an underscore,
  to prevent name conflicts with the timed code.

- Added a method to print a traceback that shows source lines from the
  expanded template.

- Use that method in main().
2003-03-14 17:21:00 +00:00
Guido van Rossum 6e31aad983 Broke down and made it work for Python 2.0 and up. (Older versions
would have required refraining from using string methods -- too
painful.)

Changed the -s option so that multiple -s options are cumulative.
2003-03-07 01:33:18 +00:00
Guido van Rossum 5573541b6f Add a note explaining why you shouldn't try to compute mean and
standard deviation.  Also add an XXX comment wondering if we should
refrain from using itertools.repeat().
2003-03-06 16:11:17 +00:00
Guido van Rossum e05dcce686 Simpler way to write reindent(), suggested by Raymond H. 2003-03-06 13:09:09 +00:00
Guido van Rossum e8577b7298 Add notes about baseline overhead, and about different Python
versions.  Add -h/--help option to print doc string.
2003-03-06 03:02:10 +00:00
Guido van Rossum b7ab6004b1 Added more documentation. 2003-03-06 02:32:19 +00:00
Guido van Rossum b3f09d4331 A flexible utility to time the execution speed of a code snippet.
Usable from the command line or from a program.
2003-03-05 23:31:58 +00:00