Revision control

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
<html>
<head>
<meta charset="UTF-8"/>
<title>DAMP - Devtools At Maximum Performance</title>

<script type="application/x-javascript">
// Empty subtests interpreted as all subtests, since otherwise meaningless.
var config = {subtests: [], repeat: 1};
var defaultConfig = {
  repeat: 1,
  rest: 100,
  subtests: {
    "cold.inspector": true,

    "simple.webconsole": true,
    "simple.inspector": true,
    "simple.debugger": true,
    "simple.styleeditor": true,
    "simple.performance": true,
    "simple.netmonitor": true,
    "simple.saveAndReadHeapSnapshot": true,

    "complicated.webconsole": true,
    "complicated.inspector": true,
    "complicated.debugger": true,
    "complicated.styleeditor": true,
    "complicated.performance": true,
    "complicated.netmonitor": true,
    "complicated.saveAndReadHeapSnapshot": true,

    "custom.inspector": true,

    "console.bulklog": true,
    "console.streamlog": true,
    "console.objectexpand": true,
    "console.openwithcache": true,
    "inspector.mutations": true,
    "inspector.layout": true,

    "panelsInBackground.reload": true,
  }
};

var testsInfo = {
  "cold.inspector": "Measure first open toolbox on inspector panel",

  "simple.webconsole": "Measure open/close toolbox on webconsole panel against simple document",
  "simple.inspector": "Measure open/close toolbox on inspector panel against simple document",
  "simple.debugger": "Measure open/close toolbox on debugger panel against simple document",
  "simple.styleeditor": "Measure open/close toolbox on style editor panel against simple document",
  "simple.performance": "Measure open/close toolbox on performance panel against simple document",
  "simple.netmonitor": "Measure open/close toolbox on network monitor panel against simple document",
  "simple.saveAndReadHeapSnapshot": "Measure open/close toolbox on memory panel and save/read heap snapshot against simple document",

  "complicated.webconsole": "Measure open/close toolbox on webconsole panel against complicated document",
  "complicated.inspector": "Measure open/close toolbox on inspector panel against complicated document",
  "complicated.debugger": "Measure open/close toolbox on debugger panel against complicated document",
  "complicated.styleeditor": "Measure open/close toolbox on style editor panel against complicated document",
  "complicated.performance": "Measure open/close toolbox on performance panel against complicated document",
  "complicated.netmonitor": "Measure open/close toolbox on network monitor panel against complicated document",
  "complicated.saveAndReadHeapSnapshot": "Measure open/close toolbox on memory panel and save/read heap snapshot against complicated document",

  "console.bulklog": "Measure time for a bunch of sync console.log statements to appear",
  "console.streamlog": "Measure rAF on page during a stream of console.log statements",
  "console.objectexpand": "Measure time to expand a large object and close the console",
  "console.openwithcache": "Measure time to render last logged messages in console for a page with 100 logged messages",
  "inspector.mutations": "Measure the time to perform childList mutations when inspector is enabled",
  "inspector.layout": "Measure the time to open/close toolbox on inspector with layout tab against big document with grid containers",

  "panelsInBackground.reload": "Measure page reload time when all panels are in background",
};

function updateConfig() {
  config = {subtests: []};
  for (var test in defaultConfig.subtests) {
    if ($("subtest-" + test).checked) { // eslint-disable-line no-undef
      config.subtests.push(test);
    }
  }

  var repeat = $("repeat").value; // eslint-disable-line no-undef
  config.repeat = isNaN(repeat) ? 1 : repeat;

  // use 1ms rest as a minimum.
  var rest = $("rest").value; // eslint-disable-line no-undef
  config.rest = Math.max(1, isNaN(rest) ? defaultConfig.rest : rest);
}
</script>
<script src="addon-test-frontend.js"></script>
</head>
<body style="font-family:sans-serif;">
<h4>DAMP - Devtools At Maximum Performance</h4>
<div id="hide-during-run">
   Visit <a href="https://wiki.mozilla.org/Buildbot/Talos/Tests#DAMP">talos/TART</a> for detailed info.<br/>
  <ul>
    <li><b>If you just opened the browser</b> - give Firefox few seconds to settle down before testing.</li>
  </ul>

Utilities:
  <a href="pages/simple.html">simple page</a>&nbsp;&nbsp;&nbsp;
  <a href="http://localhost/tests/tp5n/bild.de/www.bild.de/index.html">complicated page</a>&nbsp;&nbsp;&nbsp;
<br/><br/>
<b>Configure DAMP</b> (CTRL-F5 to reset to talos defaults) <button type="button" onclick="deselectAll()">Deselect all tests</button><br/>
<script>
  for (var test in defaultConfig.subtests) {

    // eslint-disable-next-line no-unsanitized/method
    document.write('<input type="checkbox" id="subtest-' + test + '" ' + (defaultConfig.subtests[test] ? "" : "un") + "checked>"
                  + test + "</input>"
                  + '<span style="color:grey">&nbsp;&nbsp;&nbsp;' + testsInfo[test] + "</span>"
                  + "<br/>");
  }
</script>
  <br/>
  Repeat: <input id="repeat" type="text" size=2 value="1" onchange="updateConfig()"/> times<br/>
  Delay before starting a measured animation: <input id="rest" type="text" size=4 value="10"/> ms<br/>

  <button type="button" id="start-test-button" onclick="triggerStart()">Start Devtools At Maximum Performance tests</button>&nbsp;&nbsp;&nbsp;
  <div id="run-results"></div>
</div>
<div id="show-during-run" style="display:none">Testing in progress ...</div>
</body>
</html>