@@ -31,10 +31,6 @@ def parse(self, text: str) -> dict:
31
31
js = json .load (fp )
32
32
benchmarks = js ["benchmarks" ]
33
33
for benchmark in benchmarks :
34
- unit = {
35
- "second" : "s" ,
36
- "millisecond" : "ms" ,
37
- }.get (unit := js ["metadata" ]["unit" ], unit )
38
34
name = benchmark .get ("metadata" , js ["metadata" ])["name" ]
39
35
for run in benchmark ["runs" ]:
40
36
if values := run .get ("values" , None ):
@@ -45,7 +41,7 @@ def parse(self, text: str) -> dict:
45
41
"bench-suite" : self .suiteName ,
46
42
"benchmark" : name ,
47
43
"metric.name" : "warmup" ,
48
- "metric.unit" : unit ,
44
+ "metric.unit" : "ms" ,
49
45
"metric.score-function" : "id" ,
50
46
"metric.better" : "lower" ,
51
47
"metric.type" : "numeric" ,
@@ -59,7 +55,7 @@ def parse(self, text: str) -> dict:
59
55
"bench-suite" : self .suiteName ,
60
56
"benchmark" : name ,
61
57
"metric.name" : "time" ,
62
- "metric.unit" : unit ,
58
+ "metric.unit" : "ms" ,
63
59
"metric.score-function" : "id" ,
64
60
"metric.better" : "lower" ,
65
61
"metric.type" : "numeric" ,
@@ -75,7 +71,7 @@ def parse(self, text: str) -> dict:
75
71
"bench-suite" : self .suiteName ,
76
72
"benchmark" : name ,
77
73
"metric.name" : "max-rss" ,
78
- "metric.unit" : unit ,
74
+ "metric.unit" : "B" ,
79
75
"metric.score-function" : "id" ,
80
76
"metric.better" : "lower" ,
81
77
"metric.type" : "numeric" ,
0 commit comments