Skip to content

Commit d868502

Browse files
committed
Fix the frame rate axis of the time graph
The time graph right-hand Y scale (frame rate) currently has a lower bound of 30fps, but the complexity graph has a lower bound of 15fps. Fix the time graph to use the same lower bound, so that full ramps are visible.
1 parent d51d4b2 commit d868502

File tree

1 file changed

+15
-4
lines changed
  • MotionMark/resources/debug-runner

1 file changed

+15
-4
lines changed

MotionMark/resources/debug-runner/graph.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,16 @@ Utilities.extendObject(window.benchmarkController, {
131131
tickValues = tickValues.map((x) => msPerSecond / x);
132132
return tickValues;
133133
},
134+
135+
_minFrameRate: function()
136+
{
137+
return this._targetFrameRate / 4;
138+
},
139+
140+
_maxFrameRate: function()
141+
{
142+
return this._targetFrameRate * 1.5;
143+
},
134144

135145
createComplexityGraph: function(result, timeRegressions, data, options, margins, size)
136146
{
@@ -161,8 +171,8 @@ Utilities.extendObject(window.benchmarkController, {
161171
const axisHeight = size.height - margins.top - margins.bottom;
162172

163173
// The y axis is frameLength in ms, inverted with the axis labels showing fps.
164-
const minFrameRate = this._targetFrameRate / 4;
165-
const maxFrameRate = this._targetFrameRate * 1.5;
174+
const minFrameRate = this._minFrameRate();
175+
const maxFrameRate = this._maxFrameRate();
166176

167177
const yMin = msPerSecond / minFrameRate;
168178
const yMax = msPerSecond / maxFrameRate;
@@ -334,8 +344,9 @@ Utilities.extendObject(window.benchmarkController, {
334344
.domain([0, complexityMax]);
335345

336346

337-
const minFrameRate = this._targetFrameRate / 2;
338-
const maxFrameRate = this._targetFrameRate * 1.5;
347+
const minFrameRate = this._minFrameRate();
348+
const maxFrameRate = this._maxFrameRate();
349+
339350
const yRightMin = msPerSecond / minFrameRate;
340351
const yRightMax = msPerSecond / maxFrameRate;
341352

0 commit comments

Comments
 (0)