profile.doc last updated 6/23/94 [by Guido]
PROFILER DOCUMENTATION and (mini) USER'S MANUAL
Copyright 1994, by InfoSeek Corporation, all rights reserved.
Written by James Roskind
Permission to use, copy, modify, and distribute this Python software
and its associated documentation for any purpose (subject to the
restriction in the following sentence) without fee is hereby granted,
provided that the above copyright notice appears in all copies, and
that both that copyright notice and this permission notice appear in
supporting documentation, and that the name of InfoSeek not be used in
advertising or publicity pertaining to distribution of the software
without specific, written prior permission. This permission is
explicitly restricted to the copying and modification of the software
to remain in Python, compiled Python, or other languages (such as C)
wherein the modified or derived code is exclusively imported into a
Python module.
INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
The profiler was written after only programming in Python for 3 weeks.
As a result, it is probably clumsy code, but I don't know for sure yet
'cause I'm a beginner :-). I did work hard to make the code run fast,
so that profiling would be a reasonable thing to do. I tried not to
repeat code fragments, but I'm sure I did some stuff in really awkward
ways at times. Please send suggestions for improvements to:
jar@infoseek.com. I won't promise *any* support. ...but I'd
appreciate the feedback.
SECTION HEADING LIST:
INTRODUCTION
HOW IS THIS profile DIFFERENT FROM THE OLD profile MODULE?
INSTANT USERS MANUAL
WHAT IS DETERMINISTIC PROFILING?
REFERENCE MANUAL
FUNCTION profile.run(string, filename_opt)
CLASS Stats(filename, ...)
METHOD strip_dirs()
METHOD add(filename, ...)
METHOD sort_stats(key, ...)
METHOD reverse_order()
METHOD print_stats(restriction, ...)
METHOD print_callers(restrictions, ...)
METHOD print_callees(restrictions, ...)
METHOD ignore()
LIMITATIONS
CALIBRATION
EXTENSIONS: Deriving Better Profilers
INTRODUCTION
A "profiler" is a program that describes the run time performance of a
评论6