Changeset 96209 in webkit


Ignore:
Timestamp:
Sep 28, 2011 2:30:27 AM (13 years ago)
Author:
loislo@chromium.org
Message:

Web Inspector: UI performance test for Inspector start-up time is required.
https://bugs.webkit.org/show_bug.cgi?id=68986

Reviewed by Yury Semikhatsky.

  • inspector/performance/resources/inspector-startup-time.html: Added.
  • inspector/performance/resources/performance-test.js:

(initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype._dump):
(initialize_TimeTracker.InspectorTest.runPerformanceTest):

Location:
trunk/LayoutTests
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r96208 r96209  
     12011-09-28  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: UI performance test for Inspector start-up time is required.
     4        https://bugs.webkit.org/show_bug.cgi?id=68986
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * inspector/performance/resources/inspector-startup-time.html: Added.
     9        * inspector/performance/resources/performance-test.js:
     10        (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype._dump):
     11        (initialize_TimeTracker.InspectorTest.runPerformanceTest):
     12
    1132011-09-28  Kentaro Hara  <haraken@chromium.org>
    214
  • trunk/LayoutTests/inspector/performance/resources/performance-test.js

    r96114 r96209  
    6868        {
    6969            for (var testName in this._times)
    70                 this._dumpTestStats(testName, this._times[testName]);
     70                InspectorTest.dumpTestStats(testName, this._times[testName]);
    7171
    7272            var url = WebInspector.mainResource._documentURL;
    7373            var regExp = /([^\/]+)\.html/;
    7474            var matches = regExp.exec(url);
    75             this._dumpTestStats("heap-delta-kb-" + matches[1], this._heapSizeDeltas, 1024);
     75            InspectorTest.dumpTestStats("heap-delta-kb-" + matches[1], this._heapSizeDeltas, 1024);
    7676        },
    7777
    78         _dumpTestStats: function(testName, samples, divider)
    79         {
    80             divider = divider || 1;
    81             var stripNResults = Math.floor(samples.length / 10);
    82             samples.sort(function(a, b) { return a - b; });
    83             var sum = 0;
    84             for (var i = stripNResults; i < samples.length - stripNResults; ++i)
    85                 sum += samples[i];
    86             InspectorTest.addResult("* " + testName + ": " + Math.floor(sum / (samples.length - stripNResults * 2) / divider));
    87             InspectorTest.addResult(testName + " min/max/count: " + Math.floor(samples[0] / divider) + "/" + Math.floor(samples[samples.length-1] / divider) + "/" + samples.length);
    88         }
    8978    }
    9079
    9180    var timer = new Timer(perfTest, callback);
    9281    timer._runTest();
     82}
     83
     84InspectorTest.dumpTestStats = function(testName, samples, divider)
     85{
     86    divider = divider || 1;
     87    var stripNResults = Math.floor(samples.length / 10);
     88    samples.sort(function(a, b) { return a - b; });
     89    var sum = 0;
     90    for (var i = stripNResults; i < samples.length - stripNResults; ++i)
     91        sum += samples[i];
     92    InspectorTest.addResult("* " + testName + ": " + Math.floor(sum / (samples.length - stripNResults * 2) / divider));
     93    InspectorTest.addResult(testName + " min/max/count: " + Math.floor(samples[0] / divider) + "/" + Math.floor(samples[samples.length-1] / divider) + "/" + samples.length);
    9394}
    9495
Note: See TracChangeset for help on using the changeset viewer.