grntest 1.6.8 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/text/news.md +13 -0
- data/lib/grntest/reporters/benchmark-json-reporter.rb +9 -7
- data/lib/grntest/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e19e5b6921dc29cf9645c976831b737b6bb94da8272e7a3cf7d85db0fa3a82f0
|
4
|
+
data.tar.gz: 5363b7f2169b9c15a4c3e3eaa26db86cde8ec741fd8b5471bbb108c193ed7191
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa315b1549c5688029785250abf0cc5e5e9033dc9246249ffa086d4c3040c617c007fdd52ed6091a8f539d8013bd88487936fd14bb25246daa57fecbd7bd5ec9
|
7
|
+
data.tar.gz: 0cd8d9dcec896b8fa02f42316aaebe83e8078ea81bbfabfabded590bbc70bd8342960f372b201d59ad3a1864801c6b0f1aab7dff0f136804586ab995a1f46fcc
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 1.7.0: 2024-02-05
|
4
|
+
|
5
|
+
### Fixes
|
6
|
+
|
7
|
+
* reporter: benchmark-json: Fixed a bug that invalid JSON may be
|
8
|
+
generated.
|
9
|
+
|
10
|
+
## 1.6.9: 2024-02-05
|
11
|
+
|
12
|
+
### Improvements
|
13
|
+
|
14
|
+
* reporter: benchmark-json: Added a test suite name to benchmark name.
|
15
|
+
|
3
16
|
## 1.6.8: 2024-02-05
|
4
17
|
|
5
18
|
### Fixes
|
@@ -21,10 +21,6 @@ require "grntest/reporters/base-reporter"
|
|
21
21
|
module Grntest
|
22
22
|
module Reporters
|
23
23
|
class BenchmarkJSONReporter < BaseReporter
|
24
|
-
def initialize(tester)
|
25
|
-
super
|
26
|
-
end
|
27
|
-
|
28
24
|
def on_start(result)
|
29
25
|
puts(<<-JSON)
|
30
26
|
{
|
@@ -40,11 +36,12 @@ module Grntest
|
|
40
36
|
"mhz_per_cpu": #{cpu_cycles_per_second / 1_000_000.0},
|
41
37
|
JSON
|
42
38
|
end
|
43
|
-
|
39
|
+
print(<<-JSON.chomp)
|
44
40
|
"caches": []
|
45
41
|
},
|
46
42
|
"benchmarks": [
|
47
43
|
JSON
|
44
|
+
@first_benchmark = true
|
48
45
|
end
|
49
46
|
|
50
47
|
def on_worker_start(worker)
|
@@ -79,10 +76,13 @@ module Grntest
|
|
79
76
|
|
80
77
|
def on_test_finish(worker, result)
|
81
78
|
return if result.benchmarks.empty?
|
79
|
+
print(",") unless @first_benchmark
|
80
|
+
puts
|
82
81
|
benchmarks = result.benchmarks.collect do |benchmark|
|
82
|
+
name = "#{worker.suite_name}/#{result.test_name}"
|
83
83
|
<<-JSON.chomp
|
84
84
|
{
|
85
|
-
"name": #{
|
85
|
+
"name": #{name.to_json},
|
86
86
|
"run_name": #{benchmark.name.to_json},
|
87
87
|
"run_type": "iteration",
|
88
88
|
"iterations": #{benchmark.n_iterations},
|
@@ -93,7 +93,8 @@ module Grntest
|
|
93
93
|
}
|
94
94
|
JSON
|
95
95
|
end
|
96
|
-
|
96
|
+
print(benchmarks.join(",\n"))
|
97
|
+
@first_benchmark = false
|
97
98
|
end
|
98
99
|
|
99
100
|
def on_suite_finish(worker)
|
@@ -103,6 +104,7 @@ module Grntest
|
|
103
104
|
end
|
104
105
|
|
105
106
|
def on_finish(result)
|
107
|
+
puts
|
106
108
|
puts(<<-JSON)
|
107
109
|
]
|
108
110
|
}
|
data/lib/grntest/version.rb
CHANGED