@@ -612,17 +612,19 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
612612 title ="Primary "
613613 :cases ="testCases.filter(c => c.category === 'primary') "
614614 :show-raw-data ="showRawData "
615- :commit-a ="data.a.commit "
616- :commit-b ="data.b.commit "
615+ :commit-a ="data.a "
616+ :commit-b ="data.b "
617+ :stat ="stat "
617618 :before ="before "
618619 :after ="after "> </ test-cases-table >
619620 < hr />
620621 < test-cases-table
621622 title ="Secondary "
622623 :cases ="testCases.filter(c => c.category === 'secondary') "
623624 :show-raw-data ="showRawData "
624- :commit-a ="data.a.commit "
625- :commit-b ="data.b.commit "
625+ :commit-a ="data.a "
626+ :commit-b ="data.b "
627+ :stat ="stat "
626628 :before ="before "
627629 :after ="after "> </ test-cases-table >
628630 < br />
@@ -989,16 +991,28 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
989991 } ) ;
990992
991993 app . component ( 'test-cases-table' , {
992- props : [ 'cases' , 'showRawData' , 'commitA' , 'commitB' , 'before' , 'after' , 'title' ] ,
994+ props : [ 'cases' , 'showRawData' , 'commitA' , 'commitB' , 'before' , 'after' , 'title' , 'stat' ] ,
993995 methods : {
994996 detailedQueryLink ( commit , testCase ) {
995- return `/detailed-query.html?commit=${ commit } &benchmark=${ testCase . benchmark + "-" + testCase . profile } &scenario=${ testCase . scenario } ` ;
997+ return `/detailed-query.html?commit=${ commit . commit } &benchmark=${ testCase . benchmark + "-" + testCase . profile } &scenario=${ testCase . scenario } ` ;
996998 } ,
997999 percentLink ( commit , baseCommit , testCase ) {
998- return `/detailed-query.html?commit=${ commit } &base_commit=${ baseCommit } &benchmark=${ testCase . benchmark + "-" + testCase . profile } &scenario=${ testCase . scenario } ` ;
1000+ return `/detailed-query.html?commit=${ commit . commit } &base_commit=${ baseCommit . commit } &benchmark=${ testCase . benchmark + "-" + testCase . profile } &scenario=${ testCase . scenario } ` ;
9991001 } ,
10001002 benchmarkLink ( benchmark ) {
10011003 return "https://github.com/rust-lang/rustc-perf/tree/master/collector/benchmarks/" + benchmark ;
1004+ } ,
1005+ graphLink ( commit , stat , testCase ) {
1006+ let date = new Date ( commit . date ) ;
1007+ // Move to `two weeks ago` to display history of the test case
1008+ date . setUTCDate ( date . getUTCDate ( ) - 14 ) ;
1009+ let year = date . getUTCFullYear ( ) ;
1010+ let month = ( date . getUTCMonth ( ) + 1 ) . toString ( ) . padStart ( 2 , '0' ) ;
1011+ let day = date . getUTCDate ( ) . toString ( ) . padStart ( 2 , '0' ) ;
1012+ let start = `${ year } -${ month } -${ day } ` ;
1013+
1014+ let end = commit . commit ;
1015+ return `/index.html?start=${ start } &end=${ end } &benchmark=${ testCase . benchmark } &profile=${ testCase . profile } &scenario=${ testCase . scenario } &stat=${ stat } ` ;
10021016 }
10031017 } ,
10041018 template : `
@@ -1039,7 +1053,11 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
10391053 {{ testCase.benchmark }}
10401054 </a>
10411055 </td>
1042- <td>{{ testCase.profile }}</td>
1056+ <td>
1057+ <a v-bind:href="graphLink(commitB, stat, testCase)" target="_blank" class="silent-link">
1058+ {{ testCase.profile }}
1059+ </a>
1060+ </td>
10431061 <td>{{ testCase.scenario }}</td>
10441062 <td>
10451063 <a v-bind:href="percentLink(commitB, commitA, testCase)">
0 commit comments