⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 201503 in webkit


Ignore:
Timestamp:
May 30, 2016, 8:25:40 PM (10 years ago)
Author:
BJ Burg
Message:

Web Inspector: Timelines: "-0.000ms" in Self Time
​https://bugs.webkit.org/show_bug.cgi?id=158162
<rdar://problem/26523350>

Reviewed by Darin Adler.

Values such as -0.0000 and +0.00001 seem to indicate there is
some floating point error accumulating in profile node data.
Since the sampling profiler isn't accurate to that precision,
let's clean up the data so near-zero numbers are simply zero.

  • UserInterface/Models/ProfileNode.js:

Round selfTime down to zero if it's less than the
smallest value we would show in the user interface.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r201502 r201503  
     12016-05-30  Brian Burg  <bburg@apple.com>
     2
     3        Web Inspector: Timelines: "-0.000ms" in Self Time
     4        https://bugs.webkit.org/show_bug.cgi?id=158162
     5        <rdar://problem/26523350>
     6
     7        Reviewed by Darin Adler.
     8
     9        Values such as -0.0000 and +0.00001 seem to indicate there is
     10        some floating point error accumulating in profile node data.
     11        Since the sampling profiler isn't accurate to that precision,
     12        let's clean up the data so near-zero numbers are simply zero.
     13
     14        * UserInterface/Models/ProfileNode.js:
     15        Round selfTime down to zero if it's less than the
     16        smallest value we would show in the user interface.
     17
    1182016-05-30  Brian Burg  <bburg@apple.com>
    219
  • trunk/Source/WebInspectorUI/UserInterface/Models/ProfileNode.js

    r188993 r201503  
    159159                    childNodesTotalTime += childNode.totalTime;
    160160                this._selfTime = this._totalTime - childNodesTotalTime;
     161                // selfTime can negative or very close to zero due to floating point error.
     162                // Since we show at most four decimal places, treat anything less as zero.
     163                if (this._selfTime < 0.0001)
     164                    this._selfTime = 0.0;
    161165            }
    162166
Note: See TracChangeset for help on using the changeset viewer.