@@ -469,7 +469,9 @@ class GraphController {
469
469
470
470
// Data
471
471
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 ) {
473
475
return "smoothedFrameLength" in sample ;
474
476
} ) ;
475
477
@@ -496,7 +498,8 @@ class GraphController {
496
498
}
497
499
498
500
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 ) ;
500
503
addData ( "filteredFPS" , filteredData , function ( d ) { return yRight ( d . smoothedFrameLength ) ; } , 2 ) ;
501
504
502
505
// regressions
@@ -558,7 +561,7 @@ class GraphController {
558
561
. attr ( "height" , axisHeight ) ;
559
562
560
563
var timeBisect = d3 . bisector ( function ( d ) { return d . time ; } ) . right ;
561
- var statsToHighlight = [ "complexity" , "rawFPS" , "filteredFPS" ] ;
564
+ var statsToHighlight = [ "complexity" , "rawFPS" , "filteredFPS" , "mutFPS" ] ;
562
565
area . on ( "mouseover" , function ( ) {
563
566
document . querySelector ( "#time-graph .cursor" ) . classList . remove ( "hidden" ) ;
564
567
document . querySelector ( "#test-graph nav" ) . classList . remove ( "hide-data" ) ;
@@ -586,15 +589,23 @@ class GraphController {
586
589
data_y = yLeft ( data . complexity ) ;
587
590
break ;
588
591
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
+ }
591
596
break ;
592
597
case "filteredFPS" :
593
598
if ( "smoothedFrameLength" in data ) {
594
599
content = ( msPerSecond / data . smoothedFrameLength ) . toFixed ( 2 ) ;
595
600
data_y = yRight ( data . smoothedFrameLength ) ;
596
601
}
597
602
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 ;
598
609
}
599
610
600
611
element . textContent = content ;
@@ -649,6 +660,7 @@ class GraphController {
649
660
this . _showOrHideNodes ( form [ "complexity" ] . checked , "#complexity" ) ;
650
661
this . _showOrHideNodes ( form [ "rawFPS" ] . checked , "#rawFPS" ) ;
651
662
this . _showOrHideNodes ( form [ "filteredFPS" ] . checked , "#filteredFPS" ) ;
663
+ this . _showOrHideNodes ( form [ "mutFPS" ] . checked , "#mutFPS" ) ;
652
664
this . _showOrHideNodes ( form [ "regressions" ] . checked , "#regressions" ) ;
653
665
}
654
666
0 commit comments