Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=247591 rdar://102061752 Reviewed by Dewei Zhu. This patch adds signpost patches to Speedometer plans, which will allow us to annotate generated profiles (--profile). * Tools/Scripts/webkitpy/benchmark_runner/data/patches/signposts/Speedometer2.patch: Added. * Tools/Scripts/webkitpy/benchmark_runner/data/plans/speedometer2.0.plan: * Tools/Scripts/webkitpy/benchmark_runner/data/plans/speedometer2.1.plan: Canonical link: https://commits.webkit.org/257454@main
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
Tools/Scripts/webkitpy/benchmark_runner/data/patches/signposts/Speedometer2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
diff --git a/PerformanceTests/Speedometer/resources/benchmark-runner.js b/PerformanceTests/Speedometer/resources/benchmark-runner.js | ||
index 47cedfc09a4c..82a34562bfc2 100644 | ||
--- a/resources/benchmark-runner.js | ||
+++ b/resources/benchmark-runner.js | ||
@@ -125,21 +125,27 @@ BenchmarkRunner.prototype._runTest = function(suite, test, prepareReturnValue, c | ||
|
||
var contentWindow = self._frame.contentWindow; | ||
var contentDocument = self._frame.contentDocument; | ||
+ let syncName = suite.name + '.' + test.name + '-sync'; | ||
+ let asyncName = suite.name + '.' + test.name + '-async'; | ||
|
||
self._writeMark(suite.name + '.' + test.name + '-start'); | ||
+ __signpostStart(syncName); | ||
var startTime = now(); | ||
test.run(prepareReturnValue, contentWindow, contentDocument); | ||
var endTime = now(); | ||
+ __signpostStop(syncName); | ||
self._writeMark(suite.name + '.' + test.name + '-sync-end'); | ||
|
||
var syncTime = endTime - startTime; | ||
|
||
+ __signpostStart(asyncName); | ||
var startTime = now(); | ||
setTimeout(function () { | ||
// Some browsers don't immediately update the layout for paint. | ||
// Force the layout here to ensure we're measuring the layout time. | ||
var height = self._frame.contentDocument.body.getBoundingClientRect().height; | ||
var endTime = now(); | ||
+ __signpostStop(asyncName); | ||
self._frame.contentWindow._unusedHeightValue = height; // Prevent dead code elimination. | ||
self._writeMark(suite.name + '.' + test.name + '-async-end'); | ||
callback(syncTime, endTime - startTime, height); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters