Skip to content

Commit 9236d48

Browse files
vmiurasmfr
authored andcommitted
Separate mutation frame data in the Time Graph.
Previously the 'Time graph' showed all frame samples together, undet the 'Raw FPS' and 'Filtered FPS' graphics. This change adds a separate graph for 'Mutation FPS' frames, and also excludes mutation frames from the 'Filtered FPS' graph. This makes it easier to see the correspondence between the score / regression function, and the animated frames.
1 parent 032f503 commit 9236d48

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

MotionMark/developer.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ <h1>Graph:</h1>
188188
<span class="rawFPS"></span></li>
189189
<li><label><input type="checkbox" name="filteredFPS" checked> Filtered FPS</label>
190190
<span class="filteredFPS"></span></li>
191+
<li><label><input type="checkbox" name="mutFPS" checked> Mutation FPS</label>
192+
<span class="mutFPS"></span></li>
191193
<li><label><input type="checkbox" name="regressions" checked> Regressions</label></li>
192194
</ul>
193195
</form>

MotionMark/resources/debug-runner/graph.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,9 @@ class GraphController {
469469

470470
// Data
471471
var allData = samples;
472-
var filteredData = samples.filter(function (sample) {
472+
var animData = samples.filter((sample) => sample['frameType'] == Strings.json.animationFrameType);
473+
var mutData = samples.filter((sample) => sample['frameType'] == Strings.json.mutationFrameType);
474+
var filteredData = animData.filter(function (sample) {
473475
return "smoothedFrameLength" in sample;
474476
});
475477

@@ -496,7 +498,8 @@ class GraphController {
496498
}
497499

498500
addData("complexity", allData, function(d) { return yLeft(d.complexity); }, 2);
499-
addData("rawFPS", allData, function(d) { return yRight(d.frameLength); }, 1);
501+
addData("rawFPS", animData, function(d) { return yRight(d.frameLength); }, 1);
502+
addData("mutFPS", mutData, function(d) { return yRight(d.frameLength); }, 1);
500503
addData("filteredFPS", filteredData, function(d) { return yRight(d.smoothedFrameLength); }, 2);
501504

502505
// regressions
@@ -558,7 +561,7 @@ class GraphController {
558561
.attr("height", axisHeight);
559562

560563
var timeBisect = d3.bisector(function(d) { return d.time; }).right;
561-
var statsToHighlight = ["complexity", "rawFPS", "filteredFPS"];
564+
var statsToHighlight = ["complexity", "rawFPS", "filteredFPS", "mutFPS"];
562565
area.on("mouseover", function() {
563566
document.querySelector("#time-graph .cursor").classList.remove("hidden");
564567
document.querySelector("#test-graph nav").classList.remove("hide-data");
@@ -586,15 +589,23 @@ class GraphController {
586589
data_y = yLeft(data.complexity);
587590
break;
588591
case "rawFPS":
589-
content = (msPerSecond / data.frameLength).toFixed(2);
590-
data_y = yRight(data.frameLength);
592+
if (data.frameType == Strings.json.animationFrameType) {
593+
content = (msPerSecond / data.frameLength).toFixed(2);
594+
data_y = yRight(data.frameLength);
595+
}
591596
break;
592597
case "filteredFPS":
593598
if ("smoothedFrameLength" in data) {
594599
content = (msPerSecond / data.smoothedFrameLength).toFixed(2);
595600
data_y = yRight(data.smoothedFrameLength);
596601
}
597602
break;
603+
case "mutFPS":
604+
if (data.frameType == Strings.json.mutationFrameType) {
605+
content = (msPerSecond / data.frameLength).toFixed(2);
606+
data_y = yRight(data.frameLength);
607+
}
608+
break;
598609
}
599610

600611
element.textContent = content;
@@ -649,6 +660,7 @@ class GraphController {
649660
this._showOrHideNodes(form["complexity"].checked, "#complexity");
650661
this._showOrHideNodes(form["rawFPS"].checked, "#rawFPS");
651662
this._showOrHideNodes(form["filteredFPS"].checked, "#filteredFPS");
663+
this._showOrHideNodes(form["mutFPS"].checked, "#mutFPS");
652664
this._showOrHideNodes(form["regressions"].checked, "#regressions");
653665
}
654666

MotionMark/resources/debug-runner/motionmark.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,19 @@ body.showing-test-graph header, body.showing-test-graph nav {
774774
fill: rgb(250, 73, 37);
775775
}
776776

777+
.cursor .mutFPS {
778+
fill: rgb(73, 122, 221);
779+
}
780+
781+
#mutFPS path {
782+
stroke: rgba(73, 122, 221, .7);
783+
stroke-width: 1px;
784+
}
785+
786+
#mutFPS circle {
787+
fill: rgb(73, 122, 221);
788+
}
789+
777790
#complexity-graph .regression line {
778791
stroke: rgba(253, 253, 253, .8);
779792
stroke-width: 2px;

0 commit comments

Comments
 (0)