benchmark_driver 0.16.4 → 0.16.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/benchmark_driver/output/compare.rb +6 -2
- data/lib/benchmark_driver/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bced51e496dc0dac01ce05acd745f329d601fca528c68774f79a93b04ecb556d
|
4
|
+
data.tar.gz: 771fdc95cd76c9c0afc3cda8fed73ae6a635cabbb0ffaef18f7d6723e504ec1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e2eb3eafa8732f801dde20e588d2053adf0994149437871395ea88cef9546711354b1eca4cd8900bb5240f2d772bc587790f0231bd206b743696e9e5bdd71c
|
7
|
+
data.tar.gz: 343c52838e867100185e31322b315cf0da955d9df6134dcefe71f9e37ff3bbf39013ebe556fb0c59ba1be370ac3560ad7c896dcd56b0e585985cd76ba0368223
|
data/CHANGELOG.md
CHANGED
@@ -99,7 +99,7 @@ class BenchmarkDriver::Output::Compare
|
|
99
99
|
result = @job_results.first
|
100
100
|
sec = result.duration
|
101
101
|
iter = result.loop_count
|
102
|
-
if File.exist?('/proc/cpuinfo') && (clks = estimate_clock(sec, iter)) < 1_000
|
102
|
+
if File.exist?('/proc/cpuinfo') && (clks = estimate_clock(sec, iter)) && (clks < 1_000)
|
103
103
|
$stdout.print(" (#{pretty_sec(sec, iter)}/i, #{clks}clocks/i)")
|
104
104
|
else
|
105
105
|
$stdout.print(" (#{pretty_sec(sec, iter)}/i)")
|
@@ -156,7 +156,11 @@ class BenchmarkDriver::Output::Compare
|
|
156
156
|
end
|
157
157
|
|
158
158
|
def estimate_clock sec, iter
|
159
|
-
hz =
|
159
|
+
hz = nil
|
160
|
+
|
161
|
+
File.read('/proc/cpuinfo').scan(/cpu MHz\s+:\s+([\d\.]+)/){|(f)| break hz = Rational(f.to_f) * 1_000_000}
|
162
|
+
return unless hz
|
163
|
+
|
160
164
|
r = Rational(sec, iter)
|
161
165
|
Integer(r/(1/hz))
|
162
166
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benchmark_driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
|
-
rubygems_version: 3.
|
150
|
+
rubygems_version: 3.5.3
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: Fully-featured accurate benchmark driver for Ruby
|