76 <td><a href="#PyProfile.erase">erase</a></td> |
76 <td><a href="#PyProfile.erase">erase</a></td> |
77 <td>Public method to erase the collected timing data.</td> |
77 <td>Public method to erase the collected timing data.</td> |
78 </tr> |
78 </tr> |
79 <tr> |
79 <tr> |
80 <td><a href="#PyProfile.fix_frame_filename">fix_frame_filename</a></td> |
80 <td><a href="#PyProfile.fix_frame_filename">fix_frame_filename</a></td> |
81 <td>Public method used to fixup the filename for a given frame.</td> |
81 <td>Public method used to fix up the filename for a given frame.</td> |
82 </tr> |
82 </tr> |
83 <tr> |
83 <tr> |
84 <td><a href="#PyProfile.save">save</a></td> |
84 <td><a href="#PyProfile.save">save</a></td> |
85 <td>Public method to store the collected profile data.</td> |
85 <td>Public method to store the collected profile data.</td> |
86 </tr> |
86 </tr> |
102 <p> |
102 <p> |
103 Constructor |
103 Constructor |
104 </p> |
104 </p> |
105 <dl> |
105 <dl> |
106 |
106 |
107 <dt><i>basename</i></dt> |
107 <dt><i>basename</i> (str)</dt> |
108 <dd> |
108 <dd> |
109 name of the script to be profiled (string) |
109 name of the script to be profiled |
110 </dd> |
110 </dd> |
111 <dt><i>timer</i></dt> |
111 <dt><i>timer</i> (function)</dt> |
112 <dd> |
112 <dd> |
113 function defining the timing calculation |
113 function defining the timing calculation |
114 </dd> |
114 </dd> |
115 <dt><i>bias</i></dt> |
115 <dt><i>bias</i> (float)</dt> |
116 <dd> |
116 <dd> |
117 calibration value (float) |
117 calibration value |
118 </dd> |
118 </dd> |
119 </dl> |
119 </dl> |
120 <a NAME="PyProfile.__restore" ID="PyProfile.__restore"></a> |
120 <a NAME="PyProfile.__restore" ID="PyProfile.__restore"></a> |
121 <h4>PyProfile.__restore</h4> |
121 <h4>PyProfile.__restore</h4> |
122 <b>__restore</b>(<i></i>) |
122 <b>__restore</b>(<i></i>) |
131 <p> |
131 <p> |
132 Public method to dump the statistics data. |
132 Public method to dump the statistics data. |
133 </p> |
133 </p> |
134 <dl> |
134 <dl> |
135 |
135 |
136 <dt><i>file</i></dt> |
136 <dt><i>file</i> (str)</dt> |
137 <dd> |
137 <dd> |
138 name of the file to write to (string) |
138 name of the file to write to |
139 </dd> |
139 </dd> |
140 </dl> |
140 </dl> |
141 <a NAME="PyProfile.erase" ID="PyProfile.erase"></a> |
141 <a NAME="PyProfile.erase" ID="PyProfile.erase"></a> |
142 <h4>PyProfile.erase</h4> |
142 <h4>PyProfile.erase</h4> |
143 <b>erase</b>(<i></i>) |
143 <b>erase</b>(<i></i>) |
148 <a NAME="PyProfile.fix_frame_filename" ID="PyProfile.fix_frame_filename"></a> |
148 <a NAME="PyProfile.fix_frame_filename" ID="PyProfile.fix_frame_filename"></a> |
149 <h4>PyProfile.fix_frame_filename</h4> |
149 <h4>PyProfile.fix_frame_filename</h4> |
150 <b>fix_frame_filename</b>(<i>frame</i>) |
150 <b>fix_frame_filename</b>(<i>frame</i>) |
151 |
151 |
152 <p> |
152 <p> |
153 Public method used to fixup the filename for a given frame. |
153 Public method used to fix up the filename for a given frame. |
154 </p> |
154 </p> |
155 <p> |
155 <p> |
156 The logic employed here is that if a module was loaded |
156 The logic employed here is that if a module was loaded |
157 from a .pyc file, then the correct .py to operate with |
157 from a .pyc file, then the correct .py to operate with |
158 should be in the same path as the .pyc. The reason this |
158 should be in the same path as the .pyc. The reason this |
164 on the original machine. Another case might be sharing |
164 on the original machine. Another case might be sharing |
165 code over a network... This logic deals with that. |
165 code over a network... This logic deals with that. |
166 </p> |
166 </p> |
167 <dl> |
167 <dl> |
168 |
168 |
169 <dt><i>frame</i></dt> |
169 <dt><i>frame</i> (frame)</dt> |
170 <dd> |
170 <dd> |
171 the frame object |
171 frame object |
172 </dd> |
172 </dd> |
173 </dl> |
173 </dl> |
174 <dl> |
174 <dl> |
175 <dt>Return:</dt> |
175 <dt>Return:</dt> |
176 <dd> |
176 <dd> |
177 fixed up file name (string) |
177 fixed up file name |
|
178 </dd> |
|
179 </dl> |
|
180 <dl> |
|
181 <dt>Return Type:</dt> |
|
182 <dd> |
|
183 str |
178 </dd> |
184 </dd> |
179 </dl> |
185 </dl> |
180 <a NAME="PyProfile.save" ID="PyProfile.save"></a> |
186 <a NAME="PyProfile.save" ID="PyProfile.save"></a> |
181 <h4>PyProfile.save</h4> |
187 <h4>PyProfile.save</h4> |
182 <b>save</b>(<i></i>) |
188 <b>save</b>(<i></i>) |
195 This is a variant of the one found in the standard Python |
201 This is a variant of the one found in the standard Python |
196 profile.py calling fix_frame_filename above. |
202 profile.py calling fix_frame_filename above. |
197 </p> |
203 </p> |
198 <dl> |
204 <dl> |
199 |
205 |
200 <dt><i>frame</i></dt> |
206 <dt><i>frame</i> (frame)</dt> |
201 <dd> |
207 <dd> |
202 reference to the call frame |
208 reference to the call frame |
203 </dd> |
209 </dd> |
204 <dt><i>t</i></dt> |
210 <dt><i>t</i> (list of Any)</dt> |
205 <dd> |
211 <dd> |
206 arguments |
212 arguments |
207 </dd> |
213 </dd> |
208 </dl> |
214 </dl> |
209 <dl> |
215 <dl> |
210 <dt>Return:</dt> |
216 <dt>Return:</dt> |
211 <dd> |
217 <dd> |
212 flag indicating a successful handling (boolean) |
218 flag indicating a successful handling |
|
219 </dd> |
|
220 </dl> |
|
221 <dl> |
|
222 <dt>Return Type:</dt> |
|
223 <dd> |
|
224 int |
213 </dd> |
225 </dd> |
214 </dl> |
226 </dl> |
215 <div align="right"><a href="#top">Up</a></div> |
227 <div align="right"><a href="#top">Up</a></div> |
216 <hr /> |
228 <hr /> |
217 </body></html> |
229 </body></html> |