File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,13 @@ <h1>Score</h1>
78
78
< h1 class ="section-header "> Detailed Results</ h1 >
79
79
< div class ="section-content all-metric-results ">
80
80
< div class ="aggregated-metric-result ">
81
- < h2 > Geomean </ h2 >
81
+ < h2 > Aggregate Metric </ h2 >
82
82
< div id ="geomean-chart "> </ div >
83
- < h2 > Tests </ h2 >
83
+ < h2 > Test Metrics Overview </ h2 >
84
84
< div id ="tests-chart "> </ div >
85
85
</ div >
86
86
< br />
87
- < h2 > Detailed Metrics</ h2 >
87
+ < h2 > Test Metrics Details </ h2 >
88
88
< div id ="metrics-results "> </ div >
89
89
</ div >
90
90
< div class ="buttons section-footer ">
Original file line number Diff line number Diff line change @@ -574,9 +574,9 @@ export class BenchmarkRunner {
574
574
// Prepare all iteration metrics so they are listed at the end of
575
575
// of the _metrics object, before "Total" and "Score".
576
576
for ( let i = 0 ; i < this . _iterationCount ; i ++ )
577
- iterationTotalMetric ( i ) ;
578
- getMetric ( "Geomean" ) ;
579
- getMetric ( "Score" , "score" ) ;
577
+ iterationTotalMetric ( i ) . description = `Test totals for iteration ${ i } ` ;
578
+ getMetric ( "Geomean" , "ms" ) . description = "Geomean of test totals" ;
579
+ getMetric ( "Score" , "score" ) . description = "Scaled inverse of the Geomean" ;
580
580
}
581
581
582
582
const geomean = getMetric ( "Geomean" ) ;
Original file line number Diff line number Diff line change @@ -10,9 +10,15 @@ export class Metric {
10
10
throw new Error ( `Invalid metric.name=${ name } , expected string.` ) ;
11
11
this . name = name ;
12
12
this . unit = unit ;
13
+ this . description = "" ;
13
14
14
15
this . mean = 0.0 ;
15
- this . geomean = 0.0 ;
16
+ // Make "geomean" non-enumerable so we don't serialize it with JSON.stringify
17
+ // and avoid some confusion with the top-level Geomean metric.
18
+ Object . defineProperty ( this , "geomean" , {
19
+ writable : true ,
20
+ value : 0 ,
21
+ } ) ;
16
22
this . delta = 0.0 ;
17
23
this . percentDelta = 0.0 ;
18
24
@@ -21,7 +27,6 @@ export class Metric {
21
27
this . max = 0.0 ;
22
28
23
29
this . values = [ ] ;
24
- this . children = [ ] ;
25
30
26
31
// Mark properties which refer to other Metric objects as
27
32
// non-enumerable to avoid issue with JSON.stringify due to circular
@@ -31,6 +36,10 @@ export class Metric {
31
36
writable : true ,
32
37
value : undefined ,
33
38
} ,
39
+ children : {
40
+ writable : true ,
41
+ value : [ ] ,
42
+ } ,
34
43
} ) ;
35
44
}
36
45
You can’t perform that action at this time.
0 commit comments