Changeset 33470 in webkit for trunk/JavaScriptCore
- Timestamp:
- May 14, 2008, 6:09:28 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r33466 r33470 1 2008-05-14 Kevin McCullough <[email protected]> 2 3 Reviewed by Geoff. 4 5 <rdar://problem/5770054> JavaScript profiler (10928) 6 Add the ability to get percentages of total and self time for displaying 7 in the WebInspector. 8 9 * profiler/Profile.h: 10 (KJS::Profile::totalProfileTime): 11 * profiler/ProfileNode.cpp: 12 (KJS::ProfileNode::totalPercent): 13 (KJS::ProfileNode::selfPercent): 14 * profiler/ProfileNode.h: 15 * profiler/Profiler.h: 16 (KJS::Profiler::currentProfile): 17 1 18 2008-05-14 Kevin McCullough <[email protected]> 2 19 -
trunk/JavaScriptCore/profiler/Profile.h
r33466 r33470 48 48 ProfileNode* callTree() const { return m_callTree.get(); }; 49 49 50 double totalTime() const { return m_callTree->totalTime(); } 51 50 52 void printDataInspectorStyle() const; 51 53 void printDataSampleStyle() const; -
trunk/JavaScriptCore/profiler/ProfileNode.cpp
r33466 r33470 111 111 } 112 112 113 double ProfileNode::totalPercent() const 114 { 115 return (m_timeSum / Profiler::profiler()->currentProfile()->totalTime()) * 100.0; 116 } 117 118 double ProfileNode::selfPercent() const 119 { 120 return (selfTime() / Profiler::profiler()->currentProfile()->totalTime()) * 100.0; 121 } 122 113 123 void ProfileNode::printDataInspectorStyle(int indentLevel) const 114 124 { -
trunk/JavaScriptCore/profiler/ProfileNode.h
r33466 r33470 58 58 double totalTime() const { return m_timeSum; } 59 59 double selfTime() const; 60 double totalPercent() const; 61 double selfPercent() const; 60 62 unsigned numberOfCalls() const { return m_numberOfCalls; } 61 63 const Deque<RefPtr<ProfileNode> >& children() { return m_children; } -
trunk/JavaScriptCore/profiler/Profiler.h
r33382 r33470 55 55 void clearProfiles() { if (!m_profiling) m_allProfiles.clear(); }; 56 56 57 Profile* currentProfile() const { return m_currentProfile.get(); } 58 57 59 void printDataInspectorStyle(unsigned whichProfile) const; 58 60 void printDataSampleStyle(unsigned whichProfile) const;
Note:
See TracChangeset
for help on using the changeset viewer.