Skip to content

Commit

Permalink
Add generating Profile Browser about / help to both pickle and html
Browse files Browse the repository at this point in the history
Don't think this is exactly how it was originally done, but got
decent output ;)
  • Loading branch information
zhuyifei1999 committed Sep 2, 2019
1 parent eacdba7 commit fe2b884
Show file tree
Hide file tree
Showing 21 changed files with 313 additions and 325 deletions.
213 changes: 89 additions & 124 deletions docs/ProfileBrowser.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,59 @@

<html lang=en>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>
Help for Heapy Profile Browser
</title></head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'></head>
<body>
<div>
<h2> Menus</h2>
<h2>Menus</h2>
<p>
Click on the dotted line at the top of a menu to &quot;tear it off&quot;:
a separate window containing the menu is created.
</p>
a separate window containing the menu is created.</p>
<dl>
<dt>
<h3> File Menu</h3></dt>
<h3>File Menu</h3></dt>
<dd>
<table>
<tr valign='top'>
<th> New Profile Browser</th>
<th>New Profile Browser</th>
<td>
Create a new browser window with the same file as the one
Create a new browser window with the same file as the one
opened in the current window.</td></tr>
<tr valign='top'>
<th> Open Profile</th>
<th>Open Profile</th>
<td>
Open a profile data file in the current window. Data files can be
created with<em> Stat.dump</em>.</td></tr>
Open a profile data file in the current window. Data files can be
created with<em>Stat.dump</em>.</td></tr>
<tr valign='top'>
<th> Close Window</th>
<td> Close the current window (exits from Tk if it was the last browser window).</td></tr>
<th>Close Window</th>
<td>Close the current window (exits from Tk if it was the last browser window).</td></tr>
<tr valign='top'>
<th> Clear Cache</th>
<th>Clear Cache</th>
<td>
Clear the sample cache, releasing its memory. The cache will
Clear the sample cache, releasing its memory. The cache will
be automatically filled again when needed.
<div>
This command is a kind of temporary / experimental feature. I think
the cache handling should be made automatic and less memory consuming.
</div></td></tr></table></dd>
This command is a kind of temporary / experimental feature. I think
the cache handling should be made automatic and less memory consuming.</div></td></tr></table></dd>
<dt>
<h3> Pane Menu</h3></dt>
<h3>Pane Menu</h3></dt>
<dd>
<table>
<tr>
<th> Show Control Panel</th>
<td> Show the control panel pane.</td></tr>
<th>Show Control Panel</th>
<td>Show the control panel pane.</td></tr>
<tr>
<th> Show Graph</th>
<td> Show the graph pane.</td></tr>
<th>Show Graph</th>
<td>Show the graph pane.</td></tr>
<tr>
<th> Show Table</th>
<td>
Show the table pane.
</td></tr></table></dd>
<th>Show Table</th>
<td>Show the table pane.</td></tr></table></dd>
<dt>
<h3> Graph Menu</h3></dt>
<h3>Graph Menu</h3></dt>
<dd>
<table>
<tr valign='top'>
<th> Bars / Lines</th>
<td> Choose whether the graph should be displayed using bars or lines.
<th>Bars / Lines</th>
<td>Choose whether the graph should be displayed using bars or lines.
<div>
When using bars, the sample value (size or count) for different kinds of
objects will be stacked on top of each other so the total
Expand All @@ -73,164 +66,148 @@ <h3> Graph Menu</h3></dt>
color for the same kind.
The remaing kinds, if any, are shown in black.</div></td></tr>
<tr valign='top'>
<th> Size / Count</th>
<th>Size / Count</th>
<td>
Choose whether the graph should display the size of objects
Choose whether the graph should display the size of objects
of a particular kind or the number of objects of that kind.
<div><small>
(Note that this affects only the graph, the table will still choose size or
kind as it were choosen in the table menu.)
</small></div></td></tr></table></dd>
kind as it were choosen in the table menu.)</small></div></td></tr></table></dd>
<dt>
<h3> Table Menu</h3></dt>
<h3>Table Menu</h3></dt>
<dd>
<dt>
<h4> Header submenu</h4></dt>
<h4>Header submenu</h4></dt>
<dd>

This menu has a choice of header for each column of the table. The
data of each column is determined by the header of that column, as
well as the headers of previous columns. So if you change the first
column header (A/B), the data in that column will change as well as
the data under the next header (Size/Count) and the ones that follow.

<table>
<tr valign='top'>
<th> A / B</th>
<td> Use the sample at the A or B marker in the graph.
<th>A / B</th>
<td>Use the sample at the A or B marker in the graph.
<div>

The kinds of objects shown in the table under this column
are taken from the 10 largest sample values at that point, in the same
order as they are shown in the graph. The ordering in the graph
depends on the choice of count or size in the graph menu. However,
the table may show count or size independent from the choice in the
graph.
</div></td></tr>
graph.</div></td></tr>
<tr valign='top'>
<th> Size / Count</th>
<th>Size / Count</th>
<td>
Show the size or count of the kinds of objects in each row,
Show the size or count of the kinds of objects in each row,
taken from those choosen in the A / B column.</td></tr>
<tr valign='top'>
<th> %A:Tot / %B:Tot</th>
<th>%A:Tot / %B:Tot</th>
<td>
Show percentage of the Size / Count column, relative to the total
(size or count) at either the A or B sample point.
</td></tr>
Show percentage of the Size / Count column, relative to the total
(size or count) at either the A or B sample point.</td></tr>
<tr valign='top'>
<th>
<div> Cumul /</div>
<div> A-B / B-A</div></th>
<div>Cumul /</div>
<div>A-B / B-A</div></th>
<td>
Show either a cumulative sum of the Size / Count
Show either a cumulative sum of the Size / Count
column, or the difference A-B or B-A.
<div>
The cumulative sum is taken by summing from the first table
The cumulative sum is taken by summing from the first table
row down to the last row.</div></td></tr>
<tr valign='top'>
<th> %A:Tot / %B:Tot</th>
<th>%A:Tot / %B:Tot</th>
<td>
Show percentage of the previous field,
Show percentage of the previous field,
relative to either the A or B total.</td></tr>
<tr valign='top'>
<th> Kind</th>
<th>Kind</th>
<td>
Shows the kind of objects. This is currently the only
Shows the kind of objects. This is currently the only
alternative for this column. The kind shown corresponds to
the color shown in the A / B column. A special kind is
&lt;Other&gt; which summarizes the remaining data if there were
more than 10 different kinds in the sample.
</td></tr></table></dd>
more than 10 different kinds in the sample.</td></tr></table></dd>
<dt>
<h4> Scrollbar submenu</h4></dt>
<h4>Scrollbar submenu</h4></dt>
<dd>
<table>
<tr valign='top'>
<th> Auto / On / Off</th>
<th>Auto / On / Off</th>
<td>
Choose a scrollbar mode. The usual setting is Auto
which shows the scrollbar only when needed.
</td></tr></table></dd></dd>
Choose a scrollbar mode. The usual setting is Auto
which shows the scrollbar only when needed.</td></tr></table></dd></dd>
<dt>
<h3> Window Menu</h3></dt>
<h3>Window Menu</h3></dt>
<dd>
This menu lists the names of all open windows.
Selecting one brings it to the top, deiconifying it if necessary.
</dd>
Selecting one brings it to the top, deiconifying it if necessary.</dd>
<dt>
<h3> Help Menu</h3></dt>
<h3>Help Menu</h3></dt>
<dd>
<table>
<tr valign='top'>
<th> About</th>
<td> Version, author, email, copyright.</td></tr>
<th>About</th>
<td>Version, author, email, copyright.</td></tr>
<tr valign='top'>
<th> Help</th>
<td>
Open this help window.
</td></tr></table></dd></dl>
<h2> Panes</h2>
<th>Help</th>
<td>Open this help window.</td></tr></table></dd></dl>
<h2>Panes</h2>
<p>
There are 3 panes in the main window shown by default.
At the top is the Control Panel, at the
bottom left the Graph and at the bottom right the Table.
</p>
bottom left the Graph and at the bottom right the Table.</p>
<dl>
<dt>
<h3> Control Panel Pane</h3>
<h3>Control Panel Pane</h3>
<p>
This contains controls for the graph and the markers.
It also has a quick-exit button and a collect button.</p></dt>
<dd>
<dl>
<dt>
<h4> X / Y axis control</h4></dt>
<h4>X / Y axis control</h4></dt>
<dd>

The two frames in the Control Panel having an X or Y button in the
top left corner control each axis of the graph. The X, horizontal, axis
shows the sample point. The Y axis shows either the size or count, as
choosen in the Graph menu.

<table>
<tr valign='top'>
<th> X / Y Button</th>
<th>X / Y Button</th>
<td>
Brings up a menu, currently containing
Brings up a menu, currently containing
some buttons that can also be accessed directly in the panel.</td></tr>
<tr valign='top'>
<th> Grid button</th>
<td> Select if the graph should show grid lines.</td></tr>
<th>Grid button</th>
<td>Select if the graph should show grid lines.</td></tr>
<tr valign='top'>
<th> Range buttons
<div> - / +</div></th>
<th>Range buttons
<div>- / +</div></th>
<td>
Change the range that is shown in the displayed portion
Change the range that is shown in the displayed portion
of the graph. For each time + or - is pressed the range will be
stepped up or down in the sequence (1, 2, 5) and multiples thereoff.</td></tr>
<tr valign='top'>
<th> Range field</th>
<th>Range field</th>
<td>
The current range is shown here, and a new range can be entered
The current range is shown here, and a new range can be entered
by writing to this field and pressing Enter. The format is an integer
that may be followed by a multiplier, K, M, G, or T, meaning that the value
is multipled by 1000, 1E6, 1E9, or 1E12 respectively. The maximum range is 1T.
</td></tr></table></dd>
is multipled by 1000, 1E6, 1E9, or 1E12 respectively. The maximum range is 1T.</td></tr></table></dd>
<dt>
<h4> A / B sample control</h4></dt>
<h4>A / B sample control</h4></dt>
<dd>
Each of the frames showing A or B in the top left corner
controls one of the sample markers. The current position is
shown in the bottom left corner.<small>
(This is currently not an entry field - TODO - but the
marker may be moved long distances by directly dragging
it in the Graph frame.)
</small>
it in the Graph frame.)</small>
<table>
<tr valign='top'>
<th> - / +</th>
<td> Step the marker one step to the left (-) or to the right (+).
<th>- / +</th>
<td>Step the marker one step to the left (-) or to the right (+).
<div>
The table will be updated to show new data if it was set to show
such data that were dependent on the marker moved.</div>
Expand All @@ -239,42 +216,33 @@ <h4> A / B sample control</h4></dt>
of the displayed portion of the graph, the graph will scroll so the
marker becomes visible.</div></td></tr>
<tr valign='top'>
<th> Track button</th>
<th>Track button</th>
<td>


Press to set the marker to the last sample in the file and stay at the
end as new samples are added. (New samples are periodically read from
the end of the file when auto-collect is selected via the Collect
button.)

<div>
Tracking is turned off when the marker is manually moved.
</div></td></tr></table></dd>
<div>Tracking is turned off when the marker is manually moved.</div></td></tr></table></dd>
<dt>
<h4> Exit button</h4></dt>
<dd> Exits the program, a shortcut for the Exit command in the File menu.</dd>
<h4>Exit button</h4></dt>
<dd>Exits the program, a shortcut for the Exit command in the File menu.</dd>
<dt>
<h4> Collect button</h4></dt>
<h4>Collect button</h4></dt>
<dd>
When selected, the browser will collect new samples
When selected, the browser will collect new samples
from the current file, and will continue to do this periodically.
<div><small>
Currently it will check the file for new data once a second.
</small></div></dd></dl></dd>
<div><small>Currently it will check the file for new data once a second.</small></div></dd></dl></dd>
<dt>
<h3> Graph Pane</h3></dt>
<h3>Graph Pane</h3></dt>
<dd>

This pane shows the currently visible portion of the sample file. It
can be scrolled via an horizontal scrollbar. The two markers are
shown as buttons labeled A and B above the graph and with lines
extending down in the graph. Markers can be moved by the mouse.

<p>
How to move the markers is hopefully quite self evident when tried
out but I wrote up some details about it anyway.</p>
<h4> Marker movement details</h4>
<h4>Marker movement details</h4>
<p>
Holding down the mouse button and moving the mouse moves the
underlying marker. Klicking the mouse button over a marker without
Expand All @@ -293,14 +261,11 @@ <h4> Marker movement details</h4>
the mouse enters the graph area again. Similarly for the left
side. Above or below the graph, the mouse will not move the marker at
all but will show a circle to indicate that the mouse may be
'recirculated' to move back into the graph.
</p></dd>
'recirculated' to move back into the graph.</p></dd>
<dt>
<h3> Table Pane</h3></dt>
<h3>Table Pane</h3></dt>
<dd>

This pane shows a table based on the configuration set
in the Table menu. The sample number and time stamp
show in the header.
</dd></dl>
<hr>Generated by <a href="https://zhuyifei1999.github.io/guppy3/gsl.html">GSL-HTML 3.0.1</a> on Mon Aug 26 23:24:00 2019</div></body></html>
show in the header.</dd></dl>
<hr>Generated by <a href="https://zhuyifei1999.github.io/guppy3/gsl.html">GSL-HTML 3.0.1</a> on Sun Sep 1 22:32:57 2019</div></body></html>
2 changes: 1 addition & 1 deletion docs/docexample.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ <h2>Attribute</h2></dt>
<dd>
An attribute named a_nokind, with unspecified kind.
</dd></dl></dd></dl>
<hr>Generated by <a href="https://zhuyifei1999.github.io/guppy3/gsl.html">GSL-HTML 3.0.1</a> on Mon Aug 26 23:24:00 2019</div></body></html>
<hr>Generated by <a href="https://zhuyifei1999.github.io/guppy3/gsl.html">GSL-HTML 3.0.1</a> on Sun Sep 1 22:32:55 2019</div></body></html>
2 changes: 1 addition & 1 deletion docs/docexample.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Tests generated by: guppy.gsl.Tester
# Date: Mon Aug 26 23:24:00 2019
# Date: Sun Sep 1 22:32:55 2019
class Tester:
tests = {}
def test_example_kind(self, arg):
Expand Down
Loading

0 comments on commit fe2b884

Please sign in to comment.