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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6c664c1e49fd7235ba573dc4a5bd92ce7446c0d4206c355a2c7b84320b26d5a
4
- data.tar.gz: 72d1502418ff11b5e321825ad5d3d1c44889d170c7da0becbf8b6b9fd7c5f283
3
+ metadata.gz: c22ac46ad04849b7302dc6cc8c1fe2521c73d16fa9f47e1b0af7abf175d11d1f
4
+ data.tar.gz: 2ea1a4d8b23e6efd542c204b8e557734ea4cf6c5aebc51db8aca2ac036cd2bdf
5
5
  SHA512:
6
- metadata.gz: '0956333ead3cb5307864b8d013828fff4f8dbec88c27142314d2742ba5378dbf0388f04706bf797cb24d2fd21a38576cdf04892d62664eb418d6cba38e5bfb33'
7
- data.tar.gz: 0a953ca0e9270f4eac9c00c51117bc2bfcba6a06e51f3508152b3dcbfd8e03ae4e0cebbf79bc6dc51efcf200e459d9a5ee457d70f371f946e1da8a75c50f7462
6
+ metadata.gz: 9bdfb5486834ee180b70371299387eb0fc6e6137de5d17e9e547618ba12cb72cb845893915c0195f6153ef44b4adb8ba6138504d31de4a2f523d638375cb2794
7
+ data.tar.gz: c597571580a1379603e0789b98f0d9eb0fde836d409f257474c24b39d1557a681b78c7a2d239dcc725acbbc07ed3dcca59681b23574b8c29770f63a7f36835c5
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 2.9.2 / 2021-10-10
2
+
3
+ * Bug fix
4
+ * Fix a problem with certain configs of quiet mode
5
+
1
6
  === 2.9.1 / 2021-05-24
2
7
 
3
8
  * Bug fix
@@ -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
@@ -18,7 +18,7 @@ module Benchmark
18
18
  module IPS
19
19
 
20
20
  # Benchmark-ips Gem version.
21
- VERSION = "2.9.1"
21
+ VERSION = "2.9.2"
22
22
 
23
23
  # CODENAME of current version.
24
24
  CODENAME = "Sleepy Sasquatch"
@@ -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.1
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-05-24 00:00:00.000000000 Z
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.2.9
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: []