Commit 4fffc657 authored by rniwa@webkit.org's avatar rniwa@webkit.org

Add a performance tests for selecting all content in a document

https://bugs.webkit.org/show_bug.cgi?id=113358

Reviewed by Levi Weintraub.

Add a performance test for selecting all. We wait for paint to happen by setTimeout(~, 0).

Example outputs:
    RESULT Interactive: SelectAll: Time= 652.6 ms
    median= 644.5 ms, stdev= 54.6177144967 ms, min= 599.0 ms, max= 773.0 ms

    RESULT Interactive: SelectAll: Time= 654.4 ms
    median= 633.5 ms, stdev= 55.9223145368 ms, min= 600.0 ms, max= 769.0 ms

    RESULT Interactive: SelectAll: Time= 657.9 ms
    median= 640.0 ms, stdev= 54.1420159833 ms, min= 604.0 ms, max= 774.0 ms

* Interactive/SelectAll.html: Added.
* Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 42949ede
2013-03-26 Ryosuke Niwa <rniwa@webkit.org>
Add a performance tests for selecting all content in a document
https://bugs.webkit.org/show_bug.cgi?id=113358
Reviewed by Levi Weintraub.
Add a performance test for selecting all. We wait for paint to happen by setTimeout(~, 0).
Example outputs:
RESULT Interactive: SelectAll: Time= 652.6 ms
median= 644.5 ms, stdev= 54.6177144967 ms, min= 599.0 ms, max= 773.0 ms
RESULT Interactive: SelectAll: Time= 654.4 ms
median= 633.5 ms, stdev= 55.9223145368 ms, min= 600.0 ms, max= 769.0 ms
RESULT Interactive: SelectAll: Time= 657.9 ms
median= 640.0 ms, stdev= 54.1420159833 ms, min= 604.0 ms, max= 774.0 ms
* Interactive/SelectAll.html: Added.
* Skipped:
2013-03-19 Alexei Filippov <alph@chromium.org>
Web Inspector: Fix heap profiler performance tests.
......
<!DOCTYPE html>
<html>
<body>
<script src="../resources/runner.js"></script>
<script>
PerfTestRunner.prepareToMeasureValuesAsync({
unit: 'ms',
done: function () {
var iframe = document.querySelector('iframe');
iframe.parentNode.removeChild(iframe);
}
});
function runTest() {
var iframe = document.querySelector('iframe');
iframe.contentWindow.getSelection().removeAllRanges();
iframe.contentDocument.body.offsetTop;
setTimeout(function () {
var startTime = PerfTestRunner.now();
iframe.contentDocument.execCommand('SelectAll');
iframe.contentDocument.body.offsetTop;
setTimeout(function () {
PerfTestRunner.measureValueAsync(PerfTestRunner.now() - startTime);
PerfTestRunner.gc();
setTimeout(runTest, 0);
}, 0);
}, 0);
}
</script>
<iframe src="../Parser/resources/html5.html" onload="runTest()" width="800" height="600">
</body>
</html>
# Micro benchmarks not worth running at the moment.
DOM/TraverseChildNodes.html
Interactive/SelectAll.html
# Not enabled by default on some ports
Mutation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment