|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
2 <html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#"> |
|
3 <head> |
|
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
|
5 <title>API: profiler Profiler (YUI Library)</title> |
|
6 |
|
7 <link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" /> |
|
8 <link rel="stylesheet" type="text/css" href="assets/api.css" /> |
|
9 |
|
10 <script type="text/javascript" src="assets/api-js"></script> |
|
11 <script type="text/javascript" src="assets/ac-js"></script> |
|
12 </head> |
|
13 |
|
14 <body id="yahoo-com"> |
|
15 |
|
16 <div id="doc3" class="yui-t2"> |
|
17 <div id="hd"> |
|
18 <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1> |
|
19 <h3>profiler <span class="subtitle">3.0.0</span></h3> |
|
20 <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> |
|
21 > <a href="./module_profiler.html" title="profiler">profiler</a> |
|
22 > Profiler |
|
23 |
|
24 <form onsubmit="return false"> |
|
25 <div id="propertysearch"> |
|
26 Search: <input autocomplete="off" id="searchinput" /> |
|
27 <div id="searchresults"> |
|
28 |
|
29 </div> |
|
30 </div> |
|
31 </form> |
|
32 </div> |
|
33 |
|
34 <div id="bd"> |
|
35 <div id="yui-main"> |
|
36 <div class="yui-b"> |
|
37 <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form"> |
|
38 <fieldset> |
|
39 <legend>Filters</legend> |
|
40 <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span> |
|
41 <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span> |
|
42 <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span> |
|
43 </fieldset> |
|
44 </form> |
|
45 |
|
46 <h2> |
|
47 |
|
48 |
|
49 <code>static</code> |
|
50 |
|
51 Class <b property="yui:name">Profiler</b> |
|
52 <span class="extends"> |
|
53 </span> |
|
54 |
|
55 </h2> |
|
56 <!-- class tree goes here --> |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 <div class="summary description" property="yui:description"> |
|
62 Profiles functions in JavaScript. |
|
63 </div> |
|
64 |
|
65 |
|
66 <div rel="yui:properties" resource="#properties"> |
|
67 |
|
68 </div> |
|
69 |
|
70 <div rel="yui:methods" resource="#methods"> |
|
71 <div class="section method details"> |
|
72 <h3 id="methods">Methods</h3> |
|
73 <div class="content"> |
|
74 <div class="" rel="yui:method" resource="#method_clear"> |
|
75 <h4> |
|
76 <a name="method_clear">clear</a></h4> |
|
77 <div class="detail" > |
|
78 <code> |
|
79 |
|
80 static |
|
81 |
|
82 Void |
|
83 <strong property="yui:name">clear</strong> |
|
84 ( |
|
85 |
|
86 |
|
87 name |
|
88 |
|
89 |
|
90 ) |
|
91 </code> |
|
92 |
|
93 <div class="description" property="yui:description"> |
|
94 Removes all report data from the profiler. |
|
95 </div> |
|
96 |
|
97 <div class="description"> |
|
98 |
|
99 <dl rel="yui:parameters"> |
|
100 <dt>Parameters:</dt> |
|
101 <dd rel="yui:parameter"> |
|
102 <code><span property="yui:name">name</span> |
|
103 <<span property="yui:type">String</span>> |
|
104 </code> |
|
105 <span property="yui:description"> (Optional) The name of the report to clear. If |
|
106 omitted, then all report data is cleared.</span> |
|
107 </dd> |
|
108 </dl> |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 </div> |
|
115 |
|
116 </div> |
|
117 <hr /> |
|
118 </div> |
|
119 <div class="" rel="yui:method" resource="#method_getAverage"> |
|
120 <h4> |
|
121 <a name="method_getAverage">getAverage</a></h4> |
|
122 <div class="detail" > |
|
123 <code> |
|
124 |
|
125 static |
|
126 |
|
127 float |
|
128 <strong property="yui:name">getAverage</strong> |
|
129 ( |
|
130 |
|
131 |
|
132 name |
|
133 |
|
134 |
|
135 ) |
|
136 </code> |
|
137 |
|
138 <div class="description" property="yui:description"> |
|
139 Returns the average amount of time (in milliseconds) that the function |
|
140 with the given name takes to execute. |
|
141 </div> |
|
142 |
|
143 <div class="description"> |
|
144 |
|
145 <dl rel="yui:parameters"> |
|
146 <dt>Parameters:</dt> |
|
147 <dd rel="yui:parameter"> |
|
148 <code><span property="yui:name">name</span> |
|
149 <<span property="yui:type">String</span>> |
|
150 </code> |
|
151 <span property="yui:description"> The name of the function whose data should be returned. |
|
152 If an object type method, it should be 'constructor.prototype.methodName'; |
|
153 a normal object method would just be 'object.methodName'.</span> |
|
154 </dd> |
|
155 </dl> |
|
156 |
|
157 <dl> |
|
158 <dt>Returns: |
|
159 <code property="yui:return"> |
|
160 float |
|
161 </code></dt> |
|
162 <dd property="yui:returnInfo">The average time it takes the function to execute.</dd> |
|
163 </dl> |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 </div> |
|
169 |
|
170 </div> |
|
171 <hr /> |
|
172 </div> |
|
173 <div class="" rel="yui:method" resource="#method_getCallCount"> |
|
174 <h4> |
|
175 <a name="method_getCallCount">getCallCount</a></h4> |
|
176 <div class="detail" > |
|
177 <code> |
|
178 |
|
179 static |
|
180 |
|
181 int |
|
182 <strong property="yui:name">getCallCount</strong> |
|
183 ( |
|
184 |
|
185 |
|
186 name |
|
187 |
|
188 |
|
189 ) |
|
190 </code> |
|
191 |
|
192 <div class="description" property="yui:description"> |
|
193 Returns the number of times that the given function has been called. |
|
194 </div> |
|
195 |
|
196 <div class="description"> |
|
197 |
|
198 <dl rel="yui:parameters"> |
|
199 <dt>Parameters:</dt> |
|
200 <dd rel="yui:parameter"> |
|
201 <code><span property="yui:name">name</span> |
|
202 <<span property="yui:type">String</span>> |
|
203 </code> |
|
204 <span property="yui:description"> The name of the function whose data should be returned.</span> |
|
205 </dd> |
|
206 </dl> |
|
207 |
|
208 <dl> |
|
209 <dt>Returns: |
|
210 <code property="yui:return"> |
|
211 int |
|
212 </code></dt> |
|
213 <dd property="yui:returnInfo">The number of times the function was called.</dd> |
|
214 </dl> |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 </div> |
|
220 |
|
221 </div> |
|
222 <hr /> |
|
223 </div> |
|
224 <div class="" rel="yui:method" resource="#method_getFullReport"> |
|
225 <h4> |
|
226 <a name="method_getFullReport">getFullReport</a></h4> |
|
227 <div class="detail" > |
|
228 <code> |
|
229 |
|
230 static |
|
231 |
|
232 Object |
|
233 <strong property="yui:name">getFullReport</strong> |
|
234 ( |
|
235 ) |
|
236 </code> |
|
237 |
|
238 <div class="description" property="yui:description"> |
|
239 Returns an object containing profiling data for all of the functions |
|
240 that were profiled. The object has an entry for each function and |
|
241 returns all information (min, max, average, calls, etc.) for each |
|
242 function. |
|
243 </div> |
|
244 |
|
245 <div class="description"> |
|
246 |
|
247 |
|
248 <dl> |
|
249 <dt>Returns: |
|
250 <code property="yui:return"> |
|
251 Object |
|
252 </code></dt> |
|
253 <dd property="yui:returnInfo">An object containing all profile data.</dd> |
|
254 </dl> |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 </div> |
|
260 |
|
261 </div> |
|
262 <hr /> |
|
263 </div> |
|
264 <div class=" deprecated" rel="yui:method" resource="#method_getFunctionReport"> |
|
265 <h4> |
|
266 <a name="method_getFunctionReport">getFunctionReport</a></h4> |
|
267 <div class="detail" > |
|
268 <code> |
|
269 |
|
270 static |
|
271 |
|
272 Object |
|
273 <strong property="yui:name">getFunctionReport</strong> |
|
274 ( |
|
275 ) |
|
276 </code> |
|
277 |
|
278 <div class="description" property="yui:description"> |
|
279 Returns an object containing profiling data for a single function. |
|
280 The object has an entry for min, max, avg, calls, and points). |
|
281 </div> |
|
282 |
|
283 <div class="description"> |
|
284 |
|
285 |
|
286 <dl> |
|
287 <dt>Returns: |
|
288 <code property="yui:return"> |
|
289 Object |
|
290 </code></dt> |
|
291 <dd property="yui:returnInfo">An object containing profile data for a given function.</dd> |
|
292 </dl> |
|
293 |
|
294 |
|
295 |
|
296 <div class="deprecated"> |
|
297 <strong>Deprecated</strong> Use getReport() instead. |
|
298 </div> |
|
299 |
|
300 </div> |
|
301 |
|
302 </div> |
|
303 <hr /> |
|
304 </div> |
|
305 <div class="" rel="yui:method" resource="#method_getMax"> |
|
306 <h4> |
|
307 <a name="method_getMax">getMax</a></h4> |
|
308 <div class="detail" > |
|
309 <code> |
|
310 |
|
311 static |
|
312 |
|
313 float |
|
314 <strong property="yui:name">getMax</strong> |
|
315 ( |
|
316 |
|
317 |
|
318 name |
|
319 |
|
320 |
|
321 ) |
|
322 </code> |
|
323 |
|
324 <div class="description" property="yui:description"> |
|
325 Returns the maximum amount of time (in milliseconds) that the function |
|
326 with the given name takes to execute. |
|
327 </div> |
|
328 |
|
329 <div class="description"> |
|
330 |
|
331 <dl rel="yui:parameters"> |
|
332 <dt>Parameters:</dt> |
|
333 <dd rel="yui:parameter"> |
|
334 <code><span property="yui:name">name</span> |
|
335 <<span property="yui:type">String</span>> |
|
336 </code> |
|
337 <span property="yui:description"> The name of the function whose data should be returned. |
|
338 If an object type method, it should be 'constructor.prototype.methodName'; |
|
339 a normal object method would just be 'object.methodName'.</span> |
|
340 </dd> |
|
341 </dl> |
|
342 |
|
343 <dl> |
|
344 <dt>Returns: |
|
345 <code property="yui:return"> |
|
346 float |
|
347 </code></dt> |
|
348 <dd property="yui:returnInfo">The maximum time it takes the function to execute.</dd> |
|
349 </dl> |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 </div> |
|
355 |
|
356 </div> |
|
357 <hr /> |
|
358 </div> |
|
359 <div class="" rel="yui:method" resource="#method_getMin"> |
|
360 <h4> |
|
361 <a name="method_getMin">getMin</a></h4> |
|
362 <div class="detail" > |
|
363 <code> |
|
364 |
|
365 static |
|
366 |
|
367 float |
|
368 <strong property="yui:name">getMin</strong> |
|
369 ( |
|
370 |
|
371 |
|
372 name |
|
373 |
|
374 |
|
375 ) |
|
376 </code> |
|
377 |
|
378 <div class="description" property="yui:description"> |
|
379 Returns the minimum amount of time (in milliseconds) that the function |
|
380 with the given name takes to execute. |
|
381 </div> |
|
382 |
|
383 <div class="description"> |
|
384 |
|
385 <dl rel="yui:parameters"> |
|
386 <dt>Parameters:</dt> |
|
387 <dd rel="yui:parameter"> |
|
388 <code><span property="yui:name">name</span> |
|
389 <<span property="yui:type">String</span>> |
|
390 </code> |
|
391 <span property="yui:description"> The name of the function whose data should be returned. |
|
392 If an object type method, it should be 'constructor.prototype.methodName'; |
|
393 a normal object method would just be 'object.methodName'.</span> |
|
394 </dd> |
|
395 </dl> |
|
396 |
|
397 <dl> |
|
398 <dt>Returns: |
|
399 <code property="yui:return"> |
|
400 float |
|
401 </code></dt> |
|
402 <dd property="yui:returnInfo">The minimum time it takes the function to execute.</dd> |
|
403 </dl> |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 </div> |
|
409 |
|
410 </div> |
|
411 <hr /> |
|
412 </div> |
|
413 <div class="" rel="yui:method" resource="#method_getOriginal"> |
|
414 <h4> |
|
415 <a name="method_getOriginal">getOriginal</a></h4> |
|
416 <div class="detail" > |
|
417 <code> |
|
418 |
|
419 static |
|
420 |
|
421 Function|Object |
|
422 <strong property="yui:name">getOriginal</strong> |
|
423 ( |
|
424 |
|
425 |
|
426 name |
|
427 |
|
428 |
|
429 ) |
|
430 </code> |
|
431 |
|
432 <div class="description" property="yui:description"> |
|
433 Returns the uninstrumented version of a function/object. |
|
434 </div> |
|
435 |
|
436 <div class="description"> |
|
437 |
|
438 <dl rel="yui:parameters"> |
|
439 <dt>Parameters:</dt> |
|
440 <dd rel="yui:parameter"> |
|
441 <code><span property="yui:name">name</span> |
|
442 <<span property="yui:type">String</span>> |
|
443 </code> |
|
444 <span property="yui:description"> The name of the function/object to retrieve.</span> |
|
445 </dd> |
|
446 </dl> |
|
447 |
|
448 <dl> |
|
449 <dt>Returns: |
|
450 <code property="yui:return"> |
|
451 Function|Object |
|
452 </code></dt> |
|
453 <dd property="yui:returnInfo">The uninstrumented version of a function/object.</dd> |
|
454 </dl> |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 </div> |
|
460 |
|
461 </div> |
|
462 <hr /> |
|
463 </div> |
|
464 <div class="" rel="yui:method" resource="#method_getReport"> |
|
465 <h4> |
|
466 <a name="method_getReport">getReport</a></h4> |
|
467 <div class="detail" > |
|
468 <code> |
|
469 |
|
470 static |
|
471 |
|
472 Object |
|
473 <strong property="yui:name">getReport</strong> |
|
474 ( |
|
475 ) |
|
476 </code> |
|
477 |
|
478 <div class="description" property="yui:description"> |
|
479 Returns an object containing profiling data for a single function. |
|
480 The object has an entry for min, max, avg, calls, and points). |
|
481 </div> |
|
482 |
|
483 <div class="description"> |
|
484 |
|
485 |
|
486 <dl> |
|
487 <dt>Returns: |
|
488 <code property="yui:return"> |
|
489 Object |
|
490 </code></dt> |
|
491 <dd property="yui:returnInfo">An object containing profile data for a given function.</dd> |
|
492 </dl> |
|
493 |
|
494 |
|
495 |
|
496 |
|
497 </div> |
|
498 |
|
499 </div> |
|
500 <hr /> |
|
501 </div> |
|
502 <div class="" rel="yui:method" resource="#method_instrument"> |
|
503 <h4> |
|
504 <a name="method_instrument">instrument</a></h4> |
|
505 <div class="detail" > |
|
506 <code> |
|
507 |
|
508 static |
|
509 |
|
510 Function |
|
511 <strong property="yui:name">instrument</strong> |
|
512 ( |
|
513 |
|
514 |
|
515 name |
|
516 |
|
517 |
|
518 , |
|
519 method |
|
520 |
|
521 |
|
522 ) |
|
523 </code> |
|
524 |
|
525 <div class="description" property="yui:description"> |
|
526 Instruments a method to have profiling calls. |
|
527 </div> |
|
528 |
|
529 <div class="description"> |
|
530 |
|
531 <dl rel="yui:parameters"> |
|
532 <dt>Parameters:</dt> |
|
533 <dd rel="yui:parameter"> |
|
534 <code><span property="yui:name">name</span> |
|
535 <<span property="yui:type">String</span>> |
|
536 </code> |
|
537 <span property="yui:description"> The name of the report for the function.</span> |
|
538 </dd> |
|
539 <dd rel="yui:parameter"> |
|
540 <code><span property="yui:name">method</span> |
|
541 <<span property="yui:type">Function</span>> |
|
542 </code> |
|
543 <span property="yui:description"> The function to instrument.</span> |
|
544 </dd> |
|
545 </dl> |
|
546 |
|
547 <dl> |
|
548 <dt>Returns: |
|
549 <code property="yui:return"> |
|
550 Function |
|
551 </code></dt> |
|
552 <dd property="yui:returnInfo">An instrumented version of the function.</dd> |
|
553 </dl> |
|
554 |
|
555 |
|
556 |
|
557 |
|
558 </div> |
|
559 |
|
560 </div> |
|
561 <hr /> |
|
562 </div> |
|
563 <div class="" rel="yui:method" resource="#method_pause"> |
|
564 <h4> |
|
565 <a name="method_pause">pause</a></h4> |
|
566 <div class="detail" > |
|
567 <code> |
|
568 |
|
569 static |
|
570 |
|
571 Void |
|
572 <strong property="yui:name">pause</strong> |
|
573 ( |
|
574 |
|
575 |
|
576 name |
|
577 |
|
578 |
|
579 ) |
|
580 </code> |
|
581 |
|
582 <div class="description" property="yui:description"> |
|
583 Pauses profiling information for a given name. |
|
584 </div> |
|
585 |
|
586 <div class="description"> |
|
587 |
|
588 <dl rel="yui:parameters"> |
|
589 <dt>Parameters:</dt> |
|
590 <dd rel="yui:parameter"> |
|
591 <code><span property="yui:name">name</span> |
|
592 <<span property="yui:type">String</span>> |
|
593 </code> |
|
594 <span property="yui:description"> The name of the data point.</span> |
|
595 </dd> |
|
596 </dl> |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 </div> |
|
603 |
|
604 </div> |
|
605 <hr /> |
|
606 </div> |
|
607 <div class="" rel="yui:method" resource="#method_registerConstructor"> |
|
608 <h4> |
|
609 <a name="method_registerConstructor">registerConstructor</a></h4> |
|
610 <div class="detail" > |
|
611 <code> |
|
612 |
|
613 static |
|
614 |
|
615 Void |
|
616 <strong property="yui:name">registerConstructor</strong> |
|
617 ( |
|
618 |
|
619 |
|
620 name |
|
621 |
|
622 |
|
623 , |
|
624 owner |
|
625 |
|
626 |
|
627 ) |
|
628 </code> |
|
629 |
|
630 <div class="description" property="yui:description"> |
|
631 Sets up a constructor for profiling, including all properties and methods on the prototype. |
|
632 </div> |
|
633 |
|
634 <div class="description"> |
|
635 |
|
636 <dl rel="yui:parameters"> |
|
637 <dt>Parameters:</dt> |
|
638 <dd rel="yui:parameter"> |
|
639 <code><span property="yui:name">name</span> |
|
640 <<span property="yui:type">string</span>> |
|
641 </code> |
|
642 <span property="yui:description"> The fully-qualified name of the function including namespace information.</span> |
|
643 </dd> |
|
644 <dd rel="yui:parameter"> |
|
645 <code><span property="yui:name">owner</span> |
|
646 <<span property="yui:type">Object</span>> |
|
647 </code> |
|
648 <span property="yui:description"> (Optional) The object that owns the function (namespace or containing object).</span> |
|
649 </dd> |
|
650 </dl> |
|
651 |
|
652 |
|
653 |
|
654 |
|
655 |
|
656 </div> |
|
657 |
|
658 </div> |
|
659 <hr /> |
|
660 </div> |
|
661 <div class="" rel="yui:method" resource="#method_registerFunction"> |
|
662 <h4> |
|
663 <a name="method_registerFunction">registerFunction</a></h4> |
|
664 <div class="detail" > |
|
665 <code> |
|
666 |
|
667 static |
|
668 |
|
669 Void |
|
670 <strong property="yui:name">registerFunction</strong> |
|
671 ( |
|
672 |
|
673 |
|
674 name |
|
675 |
|
676 |
|
677 , |
|
678 owner |
|
679 |
|
680 |
|
681 , |
|
682 registerPrototype |
|
683 |
|
684 |
|
685 ) |
|
686 </code> |
|
687 |
|
688 <div class="description" property="yui:description"> |
|
689 Sets up a function for profiling. It essentially overwrites the function with one |
|
690 that has instrumentation data. This method also creates an entry for the function |
|
691 in the profile report. The original function is stored on the container object. |
|
692 </div> |
|
693 |
|
694 <div class="description"> |
|
695 |
|
696 <dl rel="yui:parameters"> |
|
697 <dt>Parameters:</dt> |
|
698 <dd rel="yui:parameter"> |
|
699 <code><span property="yui:name">name</span> |
|
700 <<span property="yui:type">String</span>> |
|
701 </code> |
|
702 <span property="yui:description"> The full name of the function including namespacing. This |
|
703 is the name of the function that is stored in the report.</span> |
|
704 </dd> |
|
705 <dd rel="yui:parameter"> |
|
706 <code><span property="yui:name">owner</span> |
|
707 <<span property="yui:type">Object</span>> |
|
708 </code> |
|
709 <span property="yui:description"> (Optional) The object that owns the function. If the function |
|
710 isn't global then this argument is required. This could be the namespace that |
|
711 the function belongs to or the object on which it's |
|
712 a method.</span> |
|
713 </dd> |
|
714 <dd rel="yui:parameter"> |
|
715 <code><span property="yui:name">registerPrototype</span> |
|
716 <<span property="yui:type">Boolean</span>> |
|
717 </code> |
|
718 <span property="yui:description"> (Optional) Indicates that the prototype should |
|
719 also be instrumented. Setting to true has the same effect as calling |
|
720 registerConstructor().</span> |
|
721 </dd> |
|
722 </dl> |
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 </div> |
|
729 |
|
730 </div> |
|
731 <hr /> |
|
732 </div> |
|
733 <div class="" rel="yui:method" resource="#method_registerObject"> |
|
734 <h4> |
|
735 <a name="method_registerObject">registerObject</a></h4> |
|
736 <div class="detail" > |
|
737 <code> |
|
738 |
|
739 static |
|
740 |
|
741 Void |
|
742 <strong property="yui:name">registerObject</strong> |
|
743 ( |
|
744 |
|
745 |
|
746 name |
|
747 |
|
748 |
|
749 , |
|
750 owner |
|
751 |
|
752 |
|
753 , |
|
754 recurse |
|
755 |
|
756 |
|
757 ) |
|
758 </code> |
|
759 |
|
760 <div class="description" property="yui:description"> |
|
761 Sets up an object for profiling. It takes the object and looks for functions. |
|
762 When a function is found, registerMethod() is called on it. If set to recrusive |
|
763 mode, it will also setup objects found inside of this object for profiling, |
|
764 using the same methodology. |
|
765 </div> |
|
766 |
|
767 <div class="description"> |
|
768 |
|
769 <dl rel="yui:parameters"> |
|
770 <dt>Parameters:</dt> |
|
771 <dd rel="yui:parameter"> |
|
772 <code><span property="yui:name">name</span> |
|
773 <<span property="yui:type">String</span>> |
|
774 </code> |
|
775 <span property="yui:description"> The name of the object to profile (shows up in report).</span> |
|
776 </dd> |
|
777 <dd rel="yui:parameter"> |
|
778 <code><span property="yui:name">owner</span> |
|
779 <<span property="yui:type">Object</span>> |
|
780 </code> |
|
781 <span property="yui:description"> (Optional) The object represented by the name.</span> |
|
782 </dd> |
|
783 <dd rel="yui:parameter"> |
|
784 <code><span property="yui:name">recurse</span> |
|
785 <<span property="yui:type">Boolean</span>> |
|
786 </code> |
|
787 <span property="yui:description"> (Optional) Determines if subobject methods are also profiled.</span> |
|
788 </dd> |
|
789 </dl> |
|
790 |
|
791 |
|
792 |
|
793 |
|
794 |
|
795 </div> |
|
796 |
|
797 </div> |
|
798 <hr /> |
|
799 </div> |
|
800 <div class="" rel="yui:method" resource="#method_start"> |
|
801 <h4> |
|
802 <a name="method_start">start</a></h4> |
|
803 <div class="detail" > |
|
804 <code> |
|
805 |
|
806 static |
|
807 |
|
808 Void |
|
809 <strong property="yui:name">start</strong> |
|
810 ( |
|
811 |
|
812 |
|
813 name |
|
814 |
|
815 |
|
816 ) |
|
817 </code> |
|
818 |
|
819 <div class="description" property="yui:description"> |
|
820 Start profiling information for a given name. The name cannot be the name |
|
821 of a registered function or object. This is used to start timing for a |
|
822 particular block of code rather than instrumenting the entire function. |
|
823 </div> |
|
824 |
|
825 <div class="description"> |
|
826 |
|
827 <dl rel="yui:parameters"> |
|
828 <dt>Parameters:</dt> |
|
829 <dd rel="yui:parameter"> |
|
830 <code><span property="yui:name">name</span> |
|
831 <<span property="yui:type">String</span>> |
|
832 </code> |
|
833 <span property="yui:description"> The name of the data point.</span> |
|
834 </dd> |
|
835 </dl> |
|
836 |
|
837 |
|
838 |
|
839 |
|
840 |
|
841 </div> |
|
842 |
|
843 </div> |
|
844 <hr /> |
|
845 </div> |
|
846 <div class="" rel="yui:method" resource="#method_stop"> |
|
847 <h4> |
|
848 <a name="method_stop">stop</a></h4> |
|
849 <div class="detail" > |
|
850 <code> |
|
851 |
|
852 static |
|
853 |
|
854 Void |
|
855 <strong property="yui:name">stop</strong> |
|
856 ( |
|
857 |
|
858 |
|
859 name |
|
860 |
|
861 |
|
862 ) |
|
863 </code> |
|
864 |
|
865 <div class="description" property="yui:description"> |
|
866 Stops profiling information for a given name. |
|
867 </div> |
|
868 |
|
869 <div class="description"> |
|
870 |
|
871 <dl rel="yui:parameters"> |
|
872 <dt>Parameters:</dt> |
|
873 <dd rel="yui:parameter"> |
|
874 <code><span property="yui:name">name</span> |
|
875 <<span property="yui:type">String</span>> |
|
876 </code> |
|
877 <span property="yui:description"> The name of the data point.</span> |
|
878 </dd> |
|
879 </dl> |
|
880 |
|
881 |
|
882 |
|
883 |
|
884 |
|
885 </div> |
|
886 |
|
887 </div> |
|
888 <hr /> |
|
889 </div> |
|
890 <div class="" rel="yui:method" resource="#method_unregisterFunction"> |
|
891 <h4> |
|
892 <a name="method_unregisterFunction">unregisterFunction</a></h4> |
|
893 <div class="detail" > |
|
894 <code> |
|
895 |
|
896 static |
|
897 |
|
898 Void |
|
899 <strong property="yui:name">unregisterFunction</strong> |
|
900 ( |
|
901 |
|
902 |
|
903 name |
|
904 |
|
905 |
|
906 ) |
|
907 </code> |
|
908 |
|
909 <div class="description" property="yui:description"> |
|
910 Removes a constructor function from profiling. Reverses the registerConstructor() method. |
|
911 </div> |
|
912 |
|
913 <div class="description"> |
|
914 |
|
915 <dl rel="yui:parameters"> |
|
916 <dt>Parameters:</dt> |
|
917 <dd rel="yui:parameter"> |
|
918 <code><span property="yui:name">name</span> |
|
919 <<span property="yui:type">String</span>> |
|
920 </code> |
|
921 <span property="yui:description"> The full name of the function including namespacing. This |
|
922 is the name of the function that is stored in the report.</span> |
|
923 </dd> |
|
924 </dl> |
|
925 |
|
926 |
|
927 |
|
928 |
|
929 |
|
930 </div> |
|
931 |
|
932 </div> |
|
933 <hr /> |
|
934 </div> |
|
935 <div class="" rel="yui:method" resource="#method_unregisterObject"> |
|
936 <h4> |
|
937 <a name="method_unregisterObject">unregisterObject</a></h4> |
|
938 <div class="detail" > |
|
939 <code> |
|
940 |
|
941 static |
|
942 |
|
943 Void |
|
944 <strong property="yui:name">unregisterObject</strong> |
|
945 ( |
|
946 |
|
947 |
|
948 name |
|
949 |
|
950 |
|
951 , |
|
952 recurse |
|
953 |
|
954 |
|
955 ) |
|
956 </code> |
|
957 |
|
958 <div class="description" property="yui:description"> |
|
959 Unregisters an object for profiling. It takes the object and looks for functions. |
|
960 When a function is found, unregisterMethod() is called on it. If set to recrusive |
|
961 mode, it will also unregister objects found inside of this object, |
|
962 using the same methodology. |
|
963 </div> |
|
964 |
|
965 <div class="description"> |
|
966 |
|
967 <dl rel="yui:parameters"> |
|
968 <dt>Parameters:</dt> |
|
969 <dd rel="yui:parameter"> |
|
970 <code><span property="yui:name">name</span> |
|
971 <<span property="yui:type">String</span>> |
|
972 </code> |
|
973 <span property="yui:description"> The name of the object to unregister.</span> |
|
974 </dd> |
|
975 <dd rel="yui:parameter"> |
|
976 <code><span property="yui:name">recurse</span> |
|
977 <<span property="yui:type">Boolean</span>> |
|
978 </code> |
|
979 <span property="yui:description"> (Optional) Determines if subobject methods should also be |
|
980 unregistered.</span> |
|
981 </dd> |
|
982 </dl> |
|
983 |
|
984 |
|
985 |
|
986 |
|
987 |
|
988 </div> |
|
989 |
|
990 </div> |
|
991 <hr /> |
|
992 </div> |
|
993 </div> |
|
994 </div> |
|
995 |
|
996 </div> |
|
997 |
|
998 <div rel="yui:events" resource="#events"> |
|
999 |
|
1000 |
|
1001 </div> |
|
1002 |
|
1003 <div rel="yui:attributes" resource="#configattributes"> |
|
1004 |
|
1005 </div> |
|
1006 |
|
1007 </div> |
|
1008 </div> |
|
1009 <div class="yui-b"> |
|
1010 <div class="nav"> |
|
1011 |
|
1012 <div id="moduleList" class="module"> |
|
1013 <h4>Modules</h4> |
|
1014 <ul class="content"> |
|
1015 <li class=""><a href="module_anim.html" title="anim">anim</a></li> |
|
1016 <li class=""><a href="module_async-queue.html" title="async-queue">async-queue</a></li> |
|
1017 <li class=""><a href="module_attribute.html" title="attribute">attribute</a></li> |
|
1018 <li class=""><a href="module_base.html" title="base">base</a></li> |
|
1019 <li class=""><a href="module_cache.html" title="cache">cache</a></li> |
|
1020 <li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li> |
|
1021 <li class=""><a href="module_collection.html" title="collection">collection</a></li> |
|
1022 <li class=""><a href="module_console.html" title="console">console</a></li> |
|
1023 <li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li> |
|
1024 <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li> |
|
1025 <li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li> |
|
1026 <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li> |
|
1027 <li class=""><a href="module_datatype.html" title="datatype">datatype</a></li> |
|
1028 <li class=""><a href="module_dd.html" title="dd">dd</a></li> |
|
1029 <li class=""><a href="module_dom.html" title="dom">dom</a></li> |
|
1030 <li class=""><a href="module_dump.html" title="dump">dump</a></li> |
|
1031 <li class=""><a href="module_event.html" title="event">event</a></li> |
|
1032 <li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li> |
|
1033 <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li> |
|
1034 <li class=""><a href="module_history.html" title="history">history</a></li> |
|
1035 <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li> |
|
1036 <li class=""><a href="module_io.html" title="io">io</a></li> |
|
1037 <li class=""><a href="module_json.html" title="json">json</a></li> |
|
1038 <li class=""><a href="module_node.html" title="node">node</a></li> |
|
1039 <li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li> |
|
1040 <li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li> |
|
1041 <li class=""><a href="module_oop.html" title="oop">oop</a></li> |
|
1042 <li class=""><a href="module_overlay.html" title="overlay">overlay</a></li> |
|
1043 <li class=""><a href="module_plugin.html" title="plugin">plugin</a></li> |
|
1044 <li class="selected"><a href="module_profiler.html" title="profiler">profiler</a></li> |
|
1045 <li class=""><a href="module_queue-promote.html" title="queue-promote">queue-promote</a></li> |
|
1046 <li class=""><a href="module_slider.html" title="slider">slider</a></li> |
|
1047 <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li> |
|
1048 <li class=""><a href="module_substitute.html" title="substitute">substitute</a></li> |
|
1049 <li class=""><a href="module_test.html" title="test">test</a></li> |
|
1050 <li class=""><a href="module_widget.html" title="widget">widget</a></li> |
|
1051 <li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li> |
|
1052 <li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li> |
|
1053 <li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li> |
|
1054 <li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li> |
|
1055 <li class=""><a href="module_yui.html" title="yui">yui</a></li> |
|
1056 </ul> |
|
1057 </div> |
|
1058 |
|
1059 <div id="classList" class="module"> |
|
1060 <h4>Classes</h4> |
|
1061 <ul class="content"> |
|
1062 <li class="selected"><a href="Profiler.html" title="Profiler">Profiler</a></li> |
|
1063 </ul> |
|
1064 </div> |
|
1065 |
|
1066 <div id="fileList" class="module"> |
|
1067 <h4>Files</h4> |
|
1068 <ul class="content"> |
|
1069 <li class=""><a href="Profiler.js.html" title="Profiler.js">Profiler.js</a></li> |
|
1070 </ul> |
|
1071 </div> |
|
1072 |
|
1073 |
|
1074 <div id="methodsList" class="module"> |
|
1075 <h4>Methods</h4> |
|
1076 <ul class="content"> |
|
1077 <li class=""><a href="#method_clear" title="clear">clear</a></li> |
|
1078 <li class=""><a href="#method_getAverage" title="getAverage">getAverage</a></li> |
|
1079 <li class=""><a href="#method_getCallCount" title="getCallCount">getCallCount</a></li> |
|
1080 <li class=""><a href="#method_getFullReport" title="getFullReport">getFullReport</a></li> |
|
1081 <li class=" deprecated"><a href="#method_getFunctionReport" title="getFunctionReport">getFunctionReport</a></li> |
|
1082 <li class=""><a href="#method_getMax" title="getMax">getMax</a></li> |
|
1083 <li class=""><a href="#method_getMin" title="getMin">getMin</a></li> |
|
1084 <li class=""><a href="#method_getOriginal" title="getOriginal">getOriginal</a></li> |
|
1085 <li class=""><a href="#method_getReport" title="getReport">getReport</a></li> |
|
1086 <li class=""><a href="#method_instrument" title="instrument">instrument</a></li> |
|
1087 <li class=""><a href="#method_pause" title="pause">pause</a></li> |
|
1088 <li class=""><a href="#method_registerConstructor" title="registerConstructor">registerConstructor</a></li> |
|
1089 <li class=""><a href="#method_registerFunction" title="registerFunction">registerFunction</a></li> |
|
1090 <li class=""><a href="#method_registerObject" title="registerObject">registerObject</a></li> |
|
1091 <li class=""><a href="#method_start" title="start">start</a></li> |
|
1092 <li class=""><a href="#method_stop" title="stop">stop</a></li> |
|
1093 <li class=""><a href="#method_unregisterFunction" title="unregisterFunction">unregisterFunction</a></li> |
|
1094 <li class=""><a href="#method_unregisterObject" title="unregisterObject">unregisterObject</a></li> |
|
1095 </ul> |
|
1096 </div> |
|
1097 |
|
1098 |
|
1099 |
|
1100 </div> |
|
1101 </div> |
|
1102 </div> |
|
1103 <div id="ft"> |
|
1104 <hr /> |
|
1105 Copyright © 2009 Yahoo! Inc. All rights reserved. |
|
1106 </div> |
|
1107 </div> |
|
1108 <script type="text/javascript"> |
|
1109 ALL_YUI_PROPS = [{"access": "", "host": "Profiler", "name": "clear", "url": "Profiler.html#method_clear", "type": "method"}, {"access": "", "host": "Profiler", "name": "getAverage", "url": "Profiler.html#method_getAverage", "type": "method"}, {"access": "", "host": "Profiler", "name": "getCallCount", "url": "Profiler.html#method_getCallCount", "type": "method"}, {"access": "", "host": "Profiler", "name": "getFullReport", "url": "Profiler.html#method_getFullReport", "type": "method"}, {"access": "", "host": "Profiler", "name": "getFunctionReport", "url": "Profiler.html#method_getFunctionReport", "type": "method"}, {"access": "", "host": "Profiler", "name": "getMax", "url": "Profiler.html#method_getMax", "type": "method"}, {"access": "", "host": "Profiler", "name": "getMin", "url": "Profiler.html#method_getMin", "type": "method"}, {"access": "", "host": "Profiler", "name": "getOriginal", "url": "Profiler.html#method_getOriginal", "type": "method"}, {"access": "", "host": "Profiler", "name": "getReport", "url": "Profiler.html#method_getReport", "type": "method"}, {"access": "", "host": "Profiler", "name": "instrument", "url": "Profiler.html#method_instrument", "type": "method"}, {"access": "", "host": "Profiler", "name": "pause", "url": "Profiler.html#method_pause", "type": "method"}, {"access": "", "host": "Profiler", "name": "registerConstructor", "url": "Profiler.html#method_registerConstructor", "type": "method"}, {"access": "", "host": "Profiler", "name": "registerFunction", "url": "Profiler.html#method_registerFunction", "type": "method"}, {"access": "", "host": "Profiler", "name": "registerObject", "url": "Profiler.html#method_registerObject", "type": "method"}, {"access": "", "host": "Profiler", "name": "start", "url": "Profiler.html#method_start", "type": "method"}, {"access": "", "host": "Profiler", "name": "stop", "url": "Profiler.html#method_stop", "type": "method"}, {"access": "", "host": "Profiler", "name": "unregisterFunction", "url": "Profiler.html#method_unregisterFunction", "type": "method"}, {"access": "", "host": "Profiler", "name": "unregisterObject", "url": "Profiler.html#method_unregisterObject", "type": "method"}]; |
|
1110 </script> |
|
1111 </body> |
|
1112 </html> |