[Zope-Checkins] CVS: Zope/lib/python/Products/CallProfiler - refresh.txt:1.1.2.3 CallProfiler.py:1.1.2.4 README.txt:1.1.2.2 TODO.txt:1.1.2.3

Anthony Baxter anthony@interlink.com.au
Mon, 20 May 2002 23:14:46 -0400


Update of /cvs-repository/Zope/lib/python/Products/CallProfiler
In directory cvs.zope.org:/tmp/cvs-serv21874

Modified Files:
      Tag: anthony-CallProfiler-branch
	CallProfiler.py README.txt TODO.txt 
Added Files:
      Tag: anthony-CallProfiler-branch
	refresh.txt 
Log Message:
Icons are refreshed when the Configure screen lists modules. This works 
around the problem that when icon entries are first scanned (at boot time) 
the products have empty icon attributes.

The refresh pain has been fixed by a strongly worded refresh.txt that's
displayed on the refresh screen.

The results pages are cleaned up more. Detail display of a request from 
the aggregates page needs to be brought into the aggregate page (like the
normal detail page).

The README.txt has been updated to be actually correct. It should get 
turned into help docs, really.



=== Zope/lib/python/Products/CallProfiler/refresh.txt 1.1.2.2 => 1.1.2.3 ===
+installed.  You WILL end up with a non-functioning Zope that requires
+a restart.</strong></p>
+
+<p>
+Note also that refreshing will reset your CallProfiler settings and will
+clear out all existing Profiler data.
+</p>


=== Zope/lib/python/Products/CallProfiler/CallProfiler.py 1.1.2.3 => 1.1.2.4 ===
             self.icon = self.klass.icon
 
+    def checkIcon(self):
+	if hasattr(self, 'icon') and len(self.icon) == 0:
+	     if hasattr(self.klass, 'icon'):
+		self.icon = self.klass.icon
+
     def install(self):
         '''Install the call hook if not already installed
         '''
@@ -192,6 +197,7 @@
         for name in names:
             for profileable in profileable_modules[name]:
                 if profileable.isAvailable():
+		    profileable.checkIcon() # should have a flag.
                     l.append((name, profileable))
         return l
 
@@ -495,6 +501,21 @@
 
 #
 # $Log$
+# Revision 1.1.2.4  2002/05/21 03:14:45  anthony
+# Icons are refreshed when the Configure screen lists modules. This works
+# around the problem that when icon entries are first scanned (at boot time)
+# the products have empty icon attributes.
+#
+# The refresh pain has been fixed by a strongly worded refresh.txt that's
+# displayed on the refresh screen.
+#
+# The results pages are cleaned up more. Detail display of a request from
+# the aggregates page needs to be brought into the aggregate page (like the
+# normal detail page).
+#
+# The README.txt has been updated to be actually correct. It should get
+# turned into help docs, really.
+#
 # Revision 1.1.2.3  2002/05/20 07:29:57  anthony
 # removed some now-dead code from CallProfiler.py. hooks have been moved to
 # utilities.py


=== Zope/lib/python/Products/CallProfiler/README.txt 1.1.2.1 => 1.1.2.2 ===
-===========================
+=====================================================
 
-Purpose:
+Purpose
+-------
    To monitor the chain of DTML, ZSQL, ZPT, PythonMethod, PythonScript, ...
 calls in a Zope request and gather timing information, for the purpose of
 identifying hot-spots for potential optimisation.
 
+Usage
+-----
+
+Configuration
+~~~~~~~~~~~~~
 
-Usage:
    Once the product is installed in your Products directory and Zope has
 been restarted, visit the Call Profiler link in your Control Panel.
 
@@ -15,30 +20,60 @@
 obtain the timing information for. You may also clear any previously
 gathered timing information using the "clear" buttons.
 
+   You can also add new methods to be included in the profiling by entering
+their module name and method name in the boxes on the configuration screen.
+
+   You can unselect checkboxes to stop monitoring a call, or delete the 
+entry entirely to remove it from the configuration screen. Note that the
+entries that are the default hardcoded list will re-appear after Zope's
+restarted or the profiler's reloaded.
+
+Viewing Results
+~~~~~~~~~~~~~~~
+
    Once you have selected the documents to monitor and have clicked
 "Monitor selected calls", load up the pages you wish to profile. Once
 they're loaded (or even as they're loading :) you should visit the results
-tab. There you will find a list of the requests made by browsers with some
-timing information:
-   . clicking the url will load the page requested
+tab. There you will find a list of the requests made by browsers with the
+following columns:
+
+   . The request time
+   . The time taken for the request
+   . The URL of the request
+   . The number of calls that were profiled in the request
+   . The number of cache hits and misses (if you are using ZCacheable items,
+     like a RAM Cache).
+
+You can also get more detail on the requests:
+
    . clicking on the time of the request will bring up a blow-by-blow
      breakdown of the documents called to form the request.
+   . clicking on a column heading will sort by that column
+   . clicking the 'expand all' link will display the blow-by-blow breakdown
+     of all the results. This can be slow with a lot of results.
+
+You may also see the requests aggregated by URL on the "Aggregates" tab.
+This page shows the following columns:
+
+   . The request URL
+   . The number of matching requests for this URL
+   . The number of events that were profiled in the request
+   . The number of cache hits and misses
+   . The min, average and max time taken for the request
+   . The individual time entries for the requests
+
+You may:
+
+   . click the url to show the breakdown the page requested, with results 
+     aggregated across all calls
+   . click the individual transaction times to see the detailed breakdown 
+     of the request
 
-   You may also see the requests aggregated by URL on the "Requests By URL"
-tab - giving the minimum, average and maximum times for the responses. You
-may:
-   . click the url to load the page requested
-   . click the session times to see the detailed breakdown of the request
-
-   The detailed view is set to highlight calls that broach 3% (yellow), 5%
+The detailed view is set to highlight calls that broach 3% (yellow), 5%
 (orange) and 10% (red) of the total request time.
 
-   If a given document call has sub-calls:
-   . the '...' times indicate the time spent in the call (between sub-calls)
-   . the (end) time gives two timings:
-     1. the first is the time spent in the call not including sub-calls
-     2. the second time is the total time of the call including sub-calls
-
+The detail view shows the call tree for the data. At some point there
+should be more info on this :)
 
 Note:
    All profiling information is lost when either:
@@ -52,7 +87,7 @@
 
 
 License
-=======
+-------
 Copyright (c) ekit.com Inc (http://www.ekit-inc.com/)
 
 Permission is hereby granted, free of charge, to any person obtaining a copy


=== Zope/lib/python/Products/CallProfiler/TODO.txt 1.1.2.2 => 1.1.2.3 ===
 
-. Don't in-line the detailed display when only one data set is being 
-  shown. But mark the entry that's being displayed.
+. Allow a way to save off the raw data in a useful form.
 
-. if you refresh when the publisher hook's installed, you trash the 
-  publisher, and have to restart Zope. The publisher __call__ method 
-  gets replaced by None. 
-
-. when first loaded, the icons are not loaded. the product klass has an
-  'icon' attribute that's empty. I suspect that the check for icons is
-  happening before the products are loaded up. Should refresh them when
-  the Configure screen is hit.
+. generate hotshot data instead of in-memory data(?)
 
 . determine the pecentages for highlighting dynamically
   - if there's < 5 calls, red is >50%
@@ -22,8 +14,20 @@
 . allow auto-culling or auto-aggregation of results when it's left on for a
   long time
 
-
 DONE
+
+. when first loaded, the icons are not loaded. the product klass has an
+  'icon' attribute that's empty. I suspect that the check for icons is
+  happening before the products are loaded up. Should refresh them when
+  the Configure screen is hit. This now happens. It's a bit gross, but it
+  works.
+
+. if you refresh when the publisher hook's installed, you trash the 
+  publisher, and have to restart Zope. The publisher hook ends up
+  broken, but still installed.
+
+. Don't in-line the detailed display when only one data set is being 
+  shown. But mark the entry that's being displayed.
 
 . include a stringification of PARENTS and getPhysicalPath to indicate where
   particular methods are