Changeset 110421 in webkit


Ignore:
Timestamp:
Mar 12, 2012 5:31:41 AM (12 years ago)
Author:
loislo@chromium.org
Message:

Web Inspector: chromium: increase heap snapshot performance coverage.
https://bugs.webkit.org/show_bug.cgi?id=80829

Reviewed by Yury Semikhatsky.

  • inspector/detailed-heapshots-smoke-test.html:
  • inspector/performance-test.js:

(initialize_TimeTracker.InspectorTest.measureFunction):

Location:
trunk/PerformanceTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r110009 r110421  
     12012-03-12  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: chromium: increase heap snapshot performance coverage.
     4        https://bugs.webkit.org/show_bug.cgi?id=80829
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * inspector/detailed-heapshots-smoke-test.html:
     9        * inspector/performance-test.js:
     10        (initialize_TimeTracker.InspectorTest.measureFunction):
     11
    1122012-03-06  Kentaro Hara  <haraken@chromium.org>
    213
  • trunk/PerformanceTests/inspector/detailed-heapshots-smoke-test.html

    r109913 r110421  
    1010    function performanceTest(timer)
    1111    {
    12 
    1312        var transferTimerCookie;
    1413        var showTimerCookie;
     
    1615        var clearTimerCookie;
    1716
    18         var allTimerCookie = timer.start("summary-snapshot-time");
     17        var fullTimerCookie = timer.start("full-summary-snapshot-time");
    1918        var backendTimerCookie = timer.start("take-snapshot");
    2019        ProfilerAgent.takeHeapSnapshot(step0);
     
    2221        function step0()
    2322        {
     23            InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildRetainers");
     24            InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildDominatedNodes");
     25            InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_calculateFlags");
     26            InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildAggregates");
     27            InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_calculateObjectToWindowDistance");
     28            InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildNodeIndex");
     29            InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_markDetachedDOMTreeNodes");
     30            InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_markQueriableHeapObjects");
     31
    2432            timer.finish(backendTimerCookie);
    2533            transferTimerCookie = timer.start("transfer-snapshot");
     
    4149        {
    4250            timer.finish(showTimerCookie);
    43             timer.finish(allTimerCookie);
    4451            changeViewTimerCookie = timer.start("switch-to-containment-view");
    4552            InspectorTest.switchToView("Containment", cleanup);
     
    4956        {
    5057            timer.finish(changeViewTimerCookie);
     58            timer.finish(fullTimerCookie);
    5159            clearTimerCookie = timer.start("clear-snapshot");
    5260            ProfilerAgent.clearProfiles(done);
     
    5765        {
    5866            timer.finish(clearTimerCookie);
    59             timer.done("panel-update");
     67            timer.done("heap-snapshot");
    6068        }
    6169    }
    6270
    63     InspectorTest.runPerformanceTest(performanceTest, 25000);
     71    InspectorTest.runPerformanceTest(performanceTest, 60000);
    6472}
     73
     74var counter = 0;
     75
     76function makeObjectsTree(deep)
     77{
     78    var node = {};
     79    node.text = "some text " + counter;
     80    if (deep === 0)
     81        return node;
     82    for (var i = 0; i < 2; ++i)
     83        node[counter++] = makeObjectsTree(deep - 1);
     84    return node;
     85}
     86
     87function makeObjectsTree2(name, deep)
     88{
     89    window[name] = makeObjectsTree(deep);
     90}
     91
     92makeObjectsTree2("t", 14);
    6593
    6694</script>
  • trunk/PerformanceTests/inspector/performance-test.js

    r103175 r110421  
    8787}
    8888
     89InspectorTest.measureFunction = function(object, functionName)
     90{
     91    function measure() {
     92        var timer = InspectorTest.timer;
     93        var cookie;
     94        if (timer)
     95            cookie = timer.start(functionName);
     96        var result = func.apply(this, arguments);
     97
     98        if (timer)
     99            timer.finish(cookie);
     100        return result;
     101    }
     102    var func = object[functionName];
     103    object[functionName] = measure;
     104}
     105
    89106InspectorTest.mark = function(markerName)
    90107{
Note: See TracChangeset for help on using the changeset viewer.