grntest 1.6.9 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +7 -0
- data/lib/grntest/reporters/benchmark-json-reporter.rb +7 -6
- 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
@@ -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,6 +76,8 @@ 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|
|
83
82
|
name = "#{worker.suite_name}/#{result.test_name}"
|
84
83
|
<<-JSON.chomp
|
@@ -94,7 +93,8 @@ module Grntest
|
|
94
93
|
}
|
95
94
|
JSON
|
96
95
|
end
|
97
|
-
|
96
|
+
print(benchmarks.join(",\n"))
|
97
|
+
@first_benchmark = false
|
98
98
|
end
|
99
99
|
|
100
100
|
def on_suite_finish(worker)
|
@@ -104,6 +104,7 @@ module Grntest
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def on_finish(result)
|
107
|
+
puts
|
107
108
|
puts(<<-JSON)
|
108
109
|
]
|
109
110
|
}
|
data/lib/grntest/version.rb
CHANGED