<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 98.2 beta6 (August 14th, 1998)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>10. The Python Profiler </TITLE>
<META NAME="description" CONTENT="10. The Python Profiler ">
<META NAME="keywords" CONTENT="lib">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="lib.css">
<LINK REL="next" HREF="internet.html">
<LINK REL="previous" HREF="module-pdb.html">
<LINK REL="up" HREF="lib.html">
<LINK REL="next" HREF="Profiler_Introduction.html">
</HEAD>
<BODY bgcolor="#ffffff">
<div class=navigation>
<table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="Profiler_Introduction.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="lib.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="node175.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Python Library Reference</b></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="contents"
 src="../icons/contents.gif"></A></td>
<td><a
 href="modindex.html"><img width=32 height=32 align=bottom border=0 alt="modules"
 src="../icons/modules.gif"></a></td>
<td><A HREF="genindex.html"><img width=32 height=32 align=bottom border=0 alt="index"
 src="../icons/index.gif"></A></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="Profiler_Introduction.html">10.1 Introduction to the</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="lib.html">Python Library Reference</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="node175.html">9.2 How It Works</A></span>
<br><hr></div>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION0012000000000000000000"></A>
<BR>
10. The Python Profiler 
</H1>

<P>

<P>
Copyright &#169; 1994, by InfoSeek Corporation, all rights reserved.
<a name="l2h-1564"></a>

<P>
Written by James Roskind.<A NAME="tex2html15"
 HREF="#foot19574"><SUP>10.1</SUP></A>
<P>
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.

<P>
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.

<P>
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:
<span class=email>jar@netscape.com</span>.  I won't promise <i>any</i> support.  ...but
I'd appreciate the feedback.

<P>
<BR><HR><H4>Footnotes</H4>
<DL>
<DT><A NAME="foot19574">... Roskind.</A><A NAME="foot19574"
 HREF="profile.html#tex2html15"><SUP>10.1</SUP></A>
<DD>
  Updated and converted to <SPAN CLASS="logo LaTeX">L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X</SPAN> by Guido van Rossum.  The references to
  the old profiler are left in the text, although it no longer exists.

</DL>
<p><hr>
<!--Table of Child-Links-->


<UL>
<LI><A NAME="tex2html2685"
 HREF="Profiler_Introduction.html">10.1 Introduction to the profiler</A>
<LI><A NAME="tex2html2686"
 HREF="Profiler_Changes.html">10.2 How Is This Profiler Different From The Old Profiler?</A>
<LI><A NAME="tex2html2687"
 HREF="profile-instant.html">10.3 Instant Users Manual </A>
<LI><A NAME="tex2html2688"
 HREF="Deterministic_Profiling.html">10.4 What Is Deterministic Profiling?</A>
<LI><A NAME="tex2html2689"
 HREF="module-profile.html">10.5 Reference Manual</A>
<UL>
<LI><A NAME="tex2html2690"
 HREF="profile-stats.html">10.5.1 The <tt class=class>Stats</tt> Class </A>
</UL>
<LI><A NAME="tex2html2691"
 HREF="profile-limits.html">10.6 Limitations </A>
<LI><A NAME="tex2html2692"
 HREF="profile-calibration.html">10.7 Calibration </A>
<LI><A NAME="tex2html2693"
 HREF="Profiler_Extensions.html">10.8 Extensions -- Deriving Better Profilers</A>
<UL>
<LI><A NAME="tex2html2694"
 HREF="profile-old.html">10.8.1 OldProfile Class </A>
<LI><A NAME="tex2html2695"
 HREF="profile-HotProfile.html">10.8.2 HotProfile Class </A>
</UL></UL>
<!--End of Table of Child-Links-->
<p>
<div class=navigation><hr><table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="Profiler_Introduction.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="lib.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="node175.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Python Library Reference</b></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="contents"
 src="../icons/contents.gif"></A></td>
<td><a
 href="modindex.html"><img width=32 height=32 align=bottom border=0 alt="modules"
 src="../icons/modules.gif"></a></td>
<td><A HREF="genindex.html"><img width=32 height=32 align=bottom border=0 alt="index"
 src="../icons/index.gif"></A></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="Profiler_Introduction.html">10.1 Introduction to the</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="lib.html">Python Library Reference</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="node175.html">9.2 How It Works</A></span>
</div>
<!--End of Navigation Panel-->
<ADDRESS>
<hr>Send comments on this document to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.
</ADDRESS>
</BODY>
</HTML>
