mirror of
https://github.com/servo/servo.git
synced 2025-09-10 15:08:21 +01:00
Vendors the [blink perf tests](https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/perf_tests/). These perf tests are useful to evaluate the performance of servo. The license that governs the perf tests is included in the folder. Running benchmark cases automatically is left to future work. The update.py script is taken from mozjs and slightly adapted, so we can easily filter (and patch if this should be necessary in the future. Testing: This PR just adds the perf_tests, but does not use or modify them in any way. --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
35 lines
926 B
HTML
Vendored
35 lines
926 B
HTML
Vendored
<!DOCTYPE html>
|
|
<style>
|
|
.gridItem {
|
|
grid-column: span 100;
|
|
grid-row: span 100;
|
|
}
|
|
#grid {
|
|
display: grid;
|
|
grid-auto-rows: 2px;
|
|
grid-auto-columns: 5px;
|
|
}
|
|
</style>
|
|
<script src="../resources/runner.js"></script>
|
|
<script>
|
|
function startTest() {
|
|
PerfTestRunner.forceLayout();
|
|
|
|
var index = 0;
|
|
var grid = document.getElementById("grid");
|
|
PerfTestRunner.measureRunsPerSecond({
|
|
description: "Measures performance of layout on a page using CSS grid layout (item placement).",
|
|
run: function() {
|
|
// This style change forces the grid to place the item again, and thus regenerate the data structure holding the grid.
|
|
grid.style.gridAutoFlow = ++index % 2 ? "row" : "column";
|
|
PerfTestRunner.forceLayout();
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<body onload="startTest()">
|
|
<div id="grid"">
|
|
<div class="gridItem" style="background: lime"></div>
|
|
</div>
|
|
</body>
|