Bug 31133
| Summary: | Web Inspector: Add console.getProfile function | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Boyer <boyerd> |
| Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | bweinstein, joepeck, keishi, mnaganov, pfeldman, pmuellr, rik, robert.colburn+bugzilla |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
David Boyer
This functionality is implemented by FireUnit plugin for Firefox (FireUnit is an addon that modifies Firebug)
The function would return a JavaScript object that represents the profiling data.
And example dataset would be :
{
calls : 200, // # of calls
time : 200.00ms // total time of profile
data : [
{
avgTime : 9.525,
calls : 9,
fileName : "test.js",
maxTime : 25,
minTime : 8,
name : "doSomethingFunction",
ownTime : 85.727, // Time executing in me (not child functions)
percent : 26.21,
time : 85.727 // Total time spent in me (and child calls)
},
<...>
]
}
Can't find the function documented in fireunit plugin, but it's there.
I'm making the same request at Firebug, to move this from the fireunit addon into the firebug addon.
Ideally the result js from the two functions should be identical.
http://fireunit.org/
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Patrick Mueller
Seems like good timing if this is not yet in FireBug proper. We should coordinate with the FireBug devs to coordinate on the format.
Mikhail Naganov
This information is already available via 'console.profiles' array. Here is a reduced output sample from console:
console.profile("aaa")
console.profileEnd("aaa")
console.profiles[0]
Profile
_profilesTreeElement: Object
children: Array
0: ProfileNode
callUID: 619779680
children: Array
functionName: "(program)"
lineNumber: 1
numberOfCalls: 13
selfPercent: 0.02909303036682285
selfTime: 2.383056640625
totalPercent: 0.02909303036682285
totalTime: 2.383056640625
url: ""
Also please mind that in Firebug profiles are flat (no callee / caller information is exposed), while in Inspector a call tree is exposed in a profile.
Rob Colburn
I think we can call this resolved now, right?
Since console.profile() is doc'd by FireBug and WebKit now.
http://getfirebug.com/wiki/index.php/Console_API#console.profile.28.5Btitle.5D.29
http://www.webkit.org/blog/197/web-inspector-redesign/
Mikhail Naganov
Not quite. This issue is about adding a new function 'console.getProfile'.
Rob Colburn
Ah, it sounded like David was just asking for the data of 'fireunit.getProfile()', which is now available.
The FireUnit project hasn't been actively maintained for some time. I wonder if it would be reasonable to build the same extension for Web Inspector, now that Web Timing is spec'd and implemented in WebKit.
It would seem that @jeresig and team moved on from the project to TestSwarm and such.
Is there any additional functionality that FireUnit provides that is unattainable in WebKit.
Btw: seems like the best docs are on @jeresig's site http://ejohn.org
Brian Burg
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests.
Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.