@@ -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
0 commit comments