Ignore:
Timestamp:
May 14, 2008, 6:09:28 PM (17 years ago)
Author:
[email protected]
Message:

2008-05-14 Kevin McCullough <[email protected]>

Reviewed by Geoff and Sam.

<rdar://problem/5770054> JavaScript profiler (10928)
Add the ability to get percentages of total and self time for displaying
in the WebInspector.

  • profiler/Profile.h: (KJS::Profile::totalProfileTime):
  • profiler/ProfileNode.cpp: (KJS::ProfileNode::totalPercent): (KJS::ProfileNode::selfPercent):
  • profiler/ProfileNode.h:
  • profiler/Profiler.h: (KJS::Profiler::currentProfile):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/profiler/ProfileNode.cpp

    r33466 r33470  
    111111}
    112112
     113double ProfileNode::totalPercent() const
     114{
     115    return (m_timeSum / Profiler::profiler()->currentProfile()->totalTime()) * 100.0;
     116}
     117
     118double ProfileNode::selfPercent() const
     119{
     120    return (selfTime() / Profiler::profiler()->currentProfile()->totalTime()) * 100.0;
     121}
     122
    113123void ProfileNode::printDataInspectorStyle(int indentLevel) const
    114124{
Note: See TracChangeset for help on using the changeset viewer.