OLD | NEW |
1 | 1 |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
3 <html><head><title>Python: module telemetry.page.page_measurement</title> | 3 <html><head><title>Python: module telemetry.page.page_measurement</title> |
4 </head><body bgcolor="#f0f0f8"> | 4 </head><body bgcolor="#f0f0f8"> |
5 | 5 |
6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> | 6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
7 <tr bgcolor="#7799ee"> | 7 <tr bgcolor="#7799ee"> |
8 <td valign=bottom> <br> | 8 <td valign=bottom> <br> |
9 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.page.html"><font color="#ffffff">page</font></a>.page_measurement</strong></big
></big></font></td | 9 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.page.html"><font color="#ffffff">page</font></a>.page_measurement</strong></big
></big></font></td |
10 ><td align=right valign=bottom | 10 ><td align=right valign=bottom |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 Put together:<br> | 165 Put together:<br> |
166 <br> | 166 <br> |
167 def <a href="#PageMeasurement-MeasurePage">MeasurePage</a
>(self, page, tab, results):<br> | 167 def <a href="#PageMeasurement-MeasurePage">MeasurePage</a
>(self, page, tab, results):<br> |
168 res = tab.EvaluateJavaScript('2+2')<br> | 168 res = tab.EvaluateJavaScript('2+2')<br> |
169 if res != 4:<br> | 169 if res != 4:<br> |
170 raise Exception('Oh, wow.')<
br> | 170 raise Exception('Oh, wow.')<
br> |
171 results.Add('two_plus_two', 'count', res
)</tt></dd></dl> | 171 results.Add('two_plus_two', 'count', res
)</tt></dd></dl> |
172 | 172 |
173 <dl><dt><a name="PageMeasurement-PrepareResults"><strong>PrepareResults</strong>
</a>(self, options)</dt></dl> | 173 <dl><dt><a name="PageMeasurement-PrepareResults"><strong>PrepareResults</strong>
</a>(self, options)</dt></dl> |
174 | 174 |
175 <dl><dt><a name="PageMeasurement-__init__"><strong>__init__</strong></a>(self, a
ction_name_to_run<font color="#909090">=''</font>, needs_browser_restart_after_e
ach_run<font color="#909090">=False</font>, discard_first_result<font color="#90
9090">=False</font>)</dt></dl> | 175 <dl><dt><a name="PageMeasurement-__init__"><strong>__init__</strong></a>(self, a
ction_name_to_run<font color="#909090">=''</font>, needs_browser_restart_after_e
ach_run<font color="#909090">=False</font>, discard_first_result<font color="#90
9090">=False</font>, clear_cache_before_each_run<font color="#909090">=False</fo
nt>)</dt></dl> |
176 | 176 |
177 <hr> | 177 <hr> |
178 Data descriptors defined here:<br> | 178 Data descriptors defined here:<br> |
179 <dl><dt><strong>output_format_choices</strong></dt> | 179 <dl><dt><strong>output_format_choices</strong></dt> |
180 </dl> | 180 </dl> |
181 <dl><dt><strong>results_are_the_same_on_every_page</strong></dt> | 181 <dl><dt><strong>results_are_the_same_on_every_page</strong></dt> |
182 <dd><tt>By default, measurements are assumed to ou
tput the same values for every<br> | 182 <dd><tt>By default, measurements are assumed to ou
tput the same values for every<br> |
183 page. This allows incremental output, for example&
nbsp;in CSV. If, however, the<br> | 183 page. This allows incremental output, for example&
nbsp;in CSV. If, however, the<br> |
184 measurement discovers what values it can report&nb
sp;as it goes, and those values<br> | 184 measurement discovers what values it can report&nb
sp;as it goes, and those values<br> |
185 may vary from page to page, you need to&
nbsp;override this function and return<br> | 185 may vary from page to page, you need to&
nbsp;override this function and return<br> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 <hr> | 228 <hr> |
229 Data descriptors inherited from <a href="telemetry.page.page_test.html#PageTest"
>telemetry.page.page_test.PageTest</a>:<br> | 229 Data descriptors inherited from <a href="telemetry.page.page_test.html#PageTest"
>telemetry.page.page_test.PageTest</a>:<br> |
230 <dl><dt><strong>__dict__</strong></dt> | 230 <dl><dt><strong>__dict__</strong></dt> |
231 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> | 231 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> |
232 </dl> | 232 </dl> |
233 <dl><dt><strong>__weakref__</strong></dt> | 233 <dl><dt><strong>__weakref__</strong></dt> |
234 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> | 234 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
235 </dl> | 235 </dl> |
236 <dl><dt><strong>action_name_to_run</strong></dt> | 236 <dl><dt><strong>action_name_to_run</strong></dt> |
237 </dl> | 237 </dl> |
| 238 <dl><dt><strong>clear_cache_before_each_run</strong></dt> |
| 239 <dd><tt>When set to True, the browser's disk
and memory cache will be cleared<br> |
| 240 before each run.</tt></dd> |
| 241 </dl> |
238 <dl><dt><strong>discard_first_result</strong></dt> | 242 <dl><dt><strong>discard_first_result</strong></dt> |
239 <dd><tt>When set to True, the first run of&nb
sp;the test is discarded. This is<br> | 243 <dd><tt>When set to True, the first run of&nb
sp;the test is discarded. This is<br> |
240 useful for cases where it's desirable to have
some test resource cached so<br> | 244 useful for cases where it's desirable to have
some test resource cached so<br> |
241 the first run of the test can warm thing
s up.</tt></dd> | 245 the first run of the test can warm thing
s up.</tt></dd> |
242 </dl> | 246 </dl> |
243 </td></tr></table></td></tr></table> | 247 </td></tr></table></td></tr></table> |
244 </body></html> | 248 </body></html> |
OLD | NEW |