haikuwebkit/PerformanceTests/Layout/flexbox-column-wrap.html

36 lines
1.2 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<head>
<script src="../resources/runner.js"></script>
</head>
<body style="overflow-y: scroll">
<div id="flexbox" style="height: 400px; -webkit-flex-flow: column wrap; -webkit-flex-pack: center; -webkit-flex-align: center;">
<div style="-webkit-flex: 1 180px">1</div>
<div style="-webkit-flex: 2 auto">2 2</div>
<div style="-webkit-flex: 3 180px">3 3 3</div>
<div style="-webkit-flex: 4 auto">4 4 4 4</div>
<div style="-webkit-flex: 5 180px">5 5 5 5 5</div>
<div style="-webkit-flex: 6 auto">6 6 6 6 6 6</div>
<div style="-webkit-flex: 7 180px">7 7 7 7 7 7 7</div>
<div style="-webkit-flex: 8 auto">8 8 8 8 8 8 8 8</div>
<div style="-webkit-flex: 9 180px">9 9 9 9 9 9 9 9 9</div>
<div style="-webkit-flex: 10 auto">10 10 10 10 10 10 10 10 10</div>
</div>
</body>
<script>
function runTest()
{
document.getElementById("flexbox").style.display = '-webkit-flexbox';
document.body.clientHeight;
document.getElementById("flexbox").style.display = '';
document.body.clientHeight;
}
Rename PerfTestRunner.runPerSecond to PerfTestRunner.measureRunsPerSecond for consistency https://bugs.webkit.org/show_bug.cgi?id=99642 Reviewed by Dirk Pranke. Renamed the method. * Bindings/append-child.html: * Bindings/create-element.html: * Bindings/event-target-wrapper.html: * Bindings/first-child.html: * Bindings/get-attribute.html: * Bindings/get-element-by-id.html: * Bindings/get-elements-by-tag-name.html: * Bindings/id-getter.html: * Bindings/id-setter.html: * Bindings/insert-before.html: * Bindings/node-list-access.html: * Bindings/scroll-top.html: * Bindings/set-attribute.html: * Bindings/typed-array-construct-from-array.html: * Bindings/typed-array-construct-from-same-type.html: * Bindings/typed-array-construct-from-typed.html: * Bindings/typed-array-set-from-typed.html: * Bindings/undefined-first-child.html: * Bindings/undefined-get-element-by-id.html: * Bindings/undefined-id-getter.html: * CSS/CSSPropertySetterGetter.html: * CSS/CSSPropertyUpdateValue.html: * CSS/PseudoClassSelectors.html: * DOM/textarea-dom.html: * DOM/textarea-edit.html: * Interactive/resources/window-resize.js: * Layout/flexbox-column-nowrap.html: * Layout/flexbox-column-wrap.html: * Layout/flexbox-row-nowrap.html: * Layout/flexbox-row-wrap.html: * Layout/line-layout.html: * Parser/css-parser-yui.html: * Parser/innerHTML-setter.html: * Parser/query-selector-deep.html: * Parser/query-selector-first.html: * Parser/query-selector-last.html: * Parser/simple-url.html: * Parser/textarea-parsing.html: * Parser/tiny-innerHTML.html: * Parser/url-parser.html: * Parser/xml-parser.html: * SVG/SvgNestedUse.html: * resources/runner.js: Canonical link: https://commits.webkit.org/117606@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 22:06:52 +00:00
PerfTestRunner.measureRunsPerSecond({run: runTest, done:function() {
document.getElementById("flexbox").style.display = 'none';
performance tests should be able to measure runs/sec rather than time https://bugs.webkit.org/show_bug.cgi?id=86021 Reviewed by Ojan Vafai. PerformanceTests: Add PerfTestRunner.runPerSecond. It uses _runLoop but replaces _runner by _perSecondRunner to compute runs/s of runFunction. When _perSecondRunner is called for the first time, i.e. _completedRuns is 0 (notice this is -1 in regular run/_runner), it slowly increases the number of function calls to runFunction between time measurements in order to discount the time used by new Date() calls themselves until the total time spent reaches 100 milliseconds. By default, runPerSecond runs the test for at least 750 milliseconds in each run, and executes 21 runs, yielding the total run time of roughly 18 seconds. This is significantly faster than most of existing performance tests. Also see http://ejohn.org/blog/accuracy-of-javascript-time/. Finally, refactored the existing methods of PerfTestRunner to allow "runs/s" unit and share code. * Layout/flexbox-column-nowrap.html: * Layout/flexbox-column-wrap.html: * Layout/flexbox-row-nowrap.html: * Layout/flexbox-row-wrap.html: * resources/runner.js: (PerfTestRunner.computeStatistics): Takes unit. (PerfTestRunner.logStatistics): Ditto. (PerfTestRunner._runLoop): (PerfTestRunner._runner): (PerfTestRunner.runPerSecond): Added. (PerfTestRunner._perSecondRunner): Added. Called by _runLoop. (PerfTestRunner._perSecondRunnerIterator): Added. Tools: Allow " runs/s" or " ms" to appear after numerical values in tests. * Scripts/webkitpy/performance_tests/perftest.py: (PerfTest): LayoutTests: Add tests for PerfTestRunner.runPerSecond. * fast/harness/perftests/runs-per-second-iterations-expected.txt: Added. * fast/harness/perftests/runs-per-second-iterations.html: Added. * fast/harness/perftests/runs-per-second-log-expected.txt: Added. * fast/harness/perftests/runs-per-second-log.html: Added. Canonical link: https://commits.webkit.org/103913@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-14 05:23:37 +00:00
}});
</script>
</html>