Commit Graph

18 Commits

Author SHA1 Message Date
Guido van Rossum 3b0a3293c3 Massive changes from SF 589982 (tempfile.py rewrite, by Zack
Weinberg).  This changes all uses of deprecated tempfile functions to
the recommended ones.
2002-08-09 16:38:32 +00:00
Guido van Rossum 0d7b8bc772 Add clarifying comment. 2002-07-18 19:48:46 +00:00
Fred Drake 0d7e68adf2 Script to run the pystones "benchmark" under HotShot. 2002-07-18 19:47:05 +00:00
Fred Drake fbe3608290 Simplify; the low-level log reader is now always a modern iterator,
and should never return None.  (It only did this for an old version of
HotShot that was trying to still work with a patched Python 2.1.)
2002-07-18 19:20:23 +00:00
Fred Drake 302e2bb81b Expose the fileno() method of the underlying profiler. 2002-07-18 19:17:54 +00:00
Fred Drake 7d17e6f3d0 Expose the fileno() method of the underlying log reader.
Remove the crufty support for Python's that don't have StopIteration;
the HotShot patch for Python 2.1 has not been maintained.
2002-07-18 19:17:20 +00:00
Tim Peters 30d4896511 Gave hotshot.LogReader a close() method, to allow users to close the
file object that LogReader opens.  Used it then in test_hotshot; the
test passes again on Windows.  Thank Guido for the analysis.
2002-07-18 14:54:28 +00:00
Guido van Rossum 32616cf8ec We're no longer trying to support older Python versions with this
codebase, so get rid of the pre-2.2 contingency.
2002-07-18 14:33:14 +00:00
Fred Drake 127ee1607f Minor cleanup:
- Add comment explaining the structure of the stack.
- Minor optimization: make stack tuple directly usable as part of return
  value for enter/exit events.
2002-05-29 19:40:36 +00:00
Fred Drake 34f300a53e Added docstrings to the Profile class.
Avoid adding Python wrappers around the underlying C profiler if possible;
the extra layer of calls can lead to confusion in interpreting the logs.
2002-04-16 19:27:23 +00:00
Fred Drake 8b68862680 Set/update self.cwd properly. 2002-03-12 14:26:37 +00:00
Fred Drake 8e26b52a5c Update to reflect changes to the low-level logreader: share the info
dictionary instead of building a new one, and provide an overridable method
to allow subclasses to catch ADD_INFO records that are not part of the
initial block of ADD_INFO records created by the profiler itself.
2001-10-29 20:57:23 +00:00
Fred Drake 165b2cc2bd Allow user code to call the addinfo() method on the profiler object. 2001-10-29 20:48:09 +00:00
Fred Drake 47cada7ab8 pstats-compatible analysis module.
hotshot.stats.load(logfilename) returns a pstats.Stats instance, which is
about as compatible as it gets.
2001-10-15 22:18:53 +00:00
Fred Drake e7d8a78b8e runcall(): Expose the return value of the profiled function; this allows
changing an application to collect profile data on one part of the
    app while still making use of the profiled component, without relying
    on side effects.
2001-10-15 22:14:29 +00:00
Fred Drake d5d5a04040 Avoid deep recursion when reading the header of the log file.
Add support for extracting function names from the log file, keeping the
extract-names-from-sources support as a fallback.
2001-10-15 22:05:32 +00:00
Fred Drake d62f151a2c When we reach the end of the log file, close the logreader object. 2001-10-13 02:55:40 +00:00
Fred Drake f019324b5c Preliminary user-level interface to HotShot. We still need the analysis
tool; look for that on Monday.
2001-10-12 20:56:29 +00:00