Tuesday, February 24th, 2009
Run this method after you’ve run
console.profileEnd();to get a full dump of the profiling information. For example, given the following profile run:
- "time": 8.443,
- "calls": 611,
- "fileName":"jquery.js (line 2059)"
- // etc.
fireunit.profile( fn );
The second method added to FireUnit provides an easy way to execute and profile a single function. Roughly, this method starts the profiler, executes the function, stops the profiler, and then returns the results from getProfile(). Additionally, it watches for any exceptions that might be thrown and makes sure that the profiler is cleanly turned off anyway (a frequent frustration of mine).
Posted by Dion Almaer at 12:23 am