benchmark-ips 2.9.1 → 2.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/lib/benchmark/ips/job.rb +3 -1
- data/lib/benchmark/ips.rb +1 -1
- data/test/test_benchmark_ips.rb +33 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c22ac46ad04849b7302dc6cc8c1fe2521c73d16fa9f47e1b0af7abf175d11d1f
|
4
|
+
data.tar.gz: 2ea1a4d8b23e6efd542c204b8e557734ea4cf6c5aebc51db8aca2ac036cd2bdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bdfb5486834ee180b70371299387eb0fc6e6137de5d17e9e547618ba12cb72cb845893915c0195f6153ef44b4adb8ba6138504d31de4a2f523d638375cb2794
|
7
|
+
data.tar.gz: c597571580a1379603e0789b98f0d9eb0fde836d409f257474c24b39d1557a681b78c7a2d239dcc725acbbc07ed3dcca59681b23574b8c29770f63a7f36835c5
|
data/History.txt
CHANGED
data/lib/benchmark/ips/job.rb
CHANGED
@@ -79,6 +79,8 @@ module Benchmark
|
|
79
79
|
# Default statistical model
|
80
80
|
@stats = :sd
|
81
81
|
@confidence = 95
|
82
|
+
|
83
|
+
self.quiet = false
|
82
84
|
end
|
83
85
|
|
84
86
|
# Job configuration options, set +@warmup+ and +@time+.
|
@@ -92,7 +94,7 @@ module Benchmark
|
|
92
94
|
@iterations = opts[:iterations] if opts[:iterations]
|
93
95
|
@stats = opts[:stats] if opts[:stats]
|
94
96
|
@confidence = opts[:confidence] if opts[:confidence]
|
95
|
-
self.quiet = opts[:quiet]
|
97
|
+
self.quiet = opts[:quiet] if opts.key?(:quiet)
|
96
98
|
self.suite = opts[:suite]
|
97
99
|
end
|
98
100
|
|
data/lib/benchmark/ips.rb
CHANGED
data/test/test_benchmark_ips.rb
CHANGED
@@ -13,6 +13,13 @@ class TestBenchmarkIPS < Minitest::Test
|
|
13
13
|
$stdout = @old_stdout
|
14
14
|
end
|
15
15
|
|
16
|
+
def test_all_lib_files_are_included_in_manifest
|
17
|
+
project_root = File.expand_path('../..', __FILE__)
|
18
|
+
manifest = File.readlines("#{project_root}/Manifest.txt").map(&:chomp)
|
19
|
+
lib_files = Dir["#{project_root}/lib/**/*.rb"].map { |path| path.sub("#{project_root}/", '') }
|
20
|
+
lib_files.each { |lib_file| assert_includes manifest, lib_file }
|
21
|
+
end
|
22
|
+
|
16
23
|
def test_kwargs
|
17
24
|
Benchmark.ips(:time => 1, :warmup => 1, :quiet => false) do |x|
|
18
25
|
x.report("sleep 0.25") { sleep(0.25) }
|
@@ -63,6 +70,32 @@ class TestBenchmarkIPS < Minitest::Test
|
|
63
70
|
assert $stdout.string.size.zero?
|
64
71
|
end
|
65
72
|
|
73
|
+
def test_quiet_option_override
|
74
|
+
Benchmark.ips(quiet: true) do |x|
|
75
|
+
x.quiet = false
|
76
|
+
x.report("operation") { 100 * 100 }
|
77
|
+
end
|
78
|
+
|
79
|
+
assert $stdout.string.size > 0
|
80
|
+
$stdout.truncate(0)
|
81
|
+
|
82
|
+
Benchmark.ips(quiet: true) do |x|
|
83
|
+
x.config(quiet: false)
|
84
|
+
x.report("operation") { 100 * 100 }
|
85
|
+
end
|
86
|
+
|
87
|
+
assert $stdout.string.size > 0
|
88
|
+
$stdout.truncate(0)
|
89
|
+
|
90
|
+
Benchmark.ips(quiet: true) do |x|
|
91
|
+
# Calling config should not make quiet option overridden when no specified
|
92
|
+
x.config({})
|
93
|
+
x.report("operation") { 100 * 100 }
|
94
|
+
end
|
95
|
+
|
96
|
+
assert $stdout.string.size.zero?
|
97
|
+
end
|
98
|
+
|
66
99
|
def test_ips
|
67
100
|
report = Benchmark.ips do |x|
|
68
101
|
x.config(:time => 1, :warmup => 1)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benchmark-ips
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Phoenix
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -92,7 +92,7 @@ licenses:
|
|
92
92
|
- MIT
|
93
93
|
metadata:
|
94
94
|
homepage_uri: https://github.com/evanphx/benchmark-ips
|
95
|
-
post_install_message:
|
95
|
+
post_install_message:
|
96
96
|
rdoc_options:
|
97
97
|
- "--main"
|
98
98
|
- README.md
|
@@ -109,8 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
113
|
-
signing_key:
|
112
|
+
rubygems_version: 3.1.4
|
113
|
+
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: An iterations per second enhancement to Benchmark.
|
116
116
|
test_files: []
|