mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02: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>
31 lines
673 B
HTML
31 lines
673 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
<script src="../resources/runner.js"></script>
|
|
<script>
|
|
let dataArray = [];
|
|
for (let i = 0; i < 100000; i++)
|
|
dataArray.push('');
|
|
|
|
let iterableData = {
|
|
[Symbol.iterator]() {
|
|
var count = 0;
|
|
return {
|
|
next() {
|
|
if (count >= dataArray.length)
|
|
return {done: true};
|
|
return {done: false, value: dataArray[count++]};
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
PerfTestRunner.measureRunsPerSecond({
|
|
description: "This benchmark measures the overhead of converting JavaScript objects into WebIDL sequences (slow path using the @@iteratorprotocol)",
|
|
run: function() {
|
|
new Blob(iterableData);
|
|
}});
|
|
</script>
|
|
</body>
|
|
</html>
|