hitimes 3.1.0 → 3.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1657f67861e20c4744a997d3b5be397e5c352056d56f30677efc4bcc1c480149
4
- data.tar.gz: a54cbd0990923d2df4bab8fbc0993adbc3f92a67cfe4f5571f069726a47f0626
3
+ metadata.gz: 57075e1cc9f3fd67626ddfb568e584b28382f724f8125bd8bfa1fa325eda7bfb
4
+ data.tar.gz: 1d1b9a9b493b2ab82555320d21bdb1f5375d3c770f4d5a543af907744b4f1369
5
5
  SHA512:
6
- metadata.gz: dd5fed101b1260c167c6eeee03ae9f65670136ab6e73821260a799d6aaefa780a7144de4951053441d9ac736c7f7368b60b3f78d44fffbd7e49c17cddada3fdf
7
- data.tar.gz: 448643b3611d7161d5ac67a7d7b9112b96719c57b29bc2ca165fb512b3e3615a3a9ce97318b967a07863e00f47bd70eafcf8cbd602e6e56fefdc5a4a6a7dfbf0
6
+ metadata.gz: 71957d1e7239a59f72e0a16410bb969b277ed44dc338a26cddd8c1fdc8a6cf76cd1fce76388802b9fdf4f8021b16a1cde18308683fb40302f577b304bf32e04f
7
+ data.tar.gz: 5714424ba4d6f88384bfaf183b50a499f15b7b349dc2e655812a461c244f9d74f28e6b54acbf5af73a5717947ba37f83fbfc220164fa5e1b5e41b055e3b1aecc
data/CONTRIBUTING.md CHANGED
@@ -37,6 +37,7 @@ easiest way to contribute.
37
37
 
38
38
  * Jeremy Hinegardner
39
39
  * Wojciech Piekutowski
40
+ * Mamoru TASAKA
40
41
 
41
42
  [GitHub Account]: https://github.com/signup/free "GitHub Signup"
42
43
  [GitHub Issues]: https://github.com/copiousfreetime/hitimes/issues "Hitimes Issues"
data/HISTORY.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Hitimes Changelog
2
- ## Versino 3.1.0 - 2025-01-24
2
+ ## Version 3.2.0 - 2026-05-21
3
+ * Fix tests for future Minitest 6.0 `must_raise` change (#91)
4
+ * Add Mamoru TASAKA to contributors
5
+ * Fix flaky timestamp comparison tests with directional epsilon tolerance (#95)
6
+ * Update Semaphore CI config and ruby versions in test matrxi to 3.2 and up
7
+ * Update dependencies
8
+
9
+ ## Version 3.1.0 - 2025-01-24
3
10
  * Update the supported ruby versions to be 3.1 and up
4
11
 
5
12
  ## Version 3.0.0 - 2024-05-01
data/README.md CHANGED
@@ -121,7 +121,7 @@ Use a `Hitimes::TimedValueMetric` to calculate statistics about batches of sampl
121
121
  ``` ruby
122
122
  timed_value_metric = Hitimes::TimedValueMetric.new("batch times")
123
123
  loop do
124
- batch = ... # get a batch of things
124
+ # batch = ... # get a batch of things
125
125
  timed_value_metric.start
126
126
  # .. do something with batch
127
127
  timed_value_metric.stop(batch.size)
data/hitimes.gemspec CHANGED
@@ -1,18 +1,18 @@
1
1
  # DO NOT EDIT - This file is automatically generated
2
2
  # Make changes to Manifest.txt and/or Rakefile and regenerate
3
3
  # -*- encoding: utf-8 -*-
4
- # stub: hitimes 3.1.0 ruby lib
4
+ # stub: hitimes 3.2.0 ruby lib
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "hitimes".freeze
8
- s.version = "3.1.0".freeze
8
+ s.version = "3.2.0".freeze
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
11
11
  s.metadata = { "bug_tracker_uri" => "https://github.com/copiousfreetime/hitimes/issues", "changelog_uri" => "https://github.com/copiousfreetime/hitimes/blob/master/HISTORY.md", "homepage_uri" => "https://github.com/copiousfreetime/hitimes", "source_code_uri" => "https://github.com/copiousfreetime/hitimes" } if s.respond_to? :metadata=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Jeremy Hinegardner".freeze]
14
14
  s.bindir = "exe".freeze
15
- s.date = "2025-01-24"
15
+ s.date = "1980-01-02"
16
16
  s.description = "A fast, high resolution timer library for recording performance metrics.".freeze
17
17
  s.email = "jeremy@copiousfreetime.org".freeze
18
18
  s.extra_rdoc_files = ["CONTRIBUTING.md".freeze, "HISTORY.md".freeze, "LICENSE.txt".freeze, "Manifest.txt".freeze, "README.md".freeze]
@@ -21,6 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.licenses = ["ISC".freeze]
22
22
  s.rdoc_options = ["--main".freeze, "README.md".freeze, "--markup".freeze, "tomdoc".freeze]
23
23
  s.required_ruby_version = Gem::Requirement.new(">= 3.0.0".freeze)
24
- s.rubygems_version = "3.6.3".freeze
24
+ s.rubygems_version = "4.0.10".freeze
25
25
  s.summary = "A fast, high resolution timer library for recording performance metrics.".freeze
26
26
  end
@@ -75,12 +75,14 @@ module Hitimes
75
75
  # mark the start of the interval. Calling start on an already started
76
76
  # interval has no effect. An interval can only be started once. If the
77
77
  # interval is truely started +true+ is returned otherwise +false+.
78
+ # rubocop:disable Naming/PredicateMethod -- false positive
78
79
  def start
79
80
  return false if started?
80
81
 
81
82
  @start_instant = ::Hitimes.raw_instant
82
83
  true
83
84
  end
85
+ # rubocop:enable Naming/PredicateMethod
84
86
 
85
87
  # call-seq:
86
88
  # interval.stop -> bool or Float
data/lib/hitimes/stats.rb CHANGED
@@ -52,8 +52,8 @@ module Hitimes
52
52
  # Return the input value.
53
53
  def update(value)
54
54
  @mutex.synchronize do
55
- @min = (value < @min) ? value : @min
56
- @max = (value > @max) ? value : @max
55
+ @min = [value, @min].min
56
+ @max = [value, @max].max
57
57
 
58
58
  @count += 1
59
59
  @sum += value
@@ -171,6 +171,7 @@ module Hitimes
171
171
 
172
172
  # forward appropriate calls directly to the stats object
173
173
  extend Forwardable
174
+
174
175
  def_delegators :@stats, :count, :max, :mean, :min, :rate, :stddev, :sum, :sumsq
175
176
  alias duration sum
176
177
  end
@@ -67,6 +67,7 @@ module Hitimes
67
67
 
68
68
  # forward appropriate calls directly to the stats object
69
69
  extend Forwardable
70
+
70
71
  def_delegators :@stats, :count, :max, :mean, :min, :stddev, :sum, :sumsq
71
72
  end
72
73
  end
@@ -6,5 +6,5 @@
6
6
  #++
7
7
 
8
8
  module Hitimes
9
- VERSION = "3.1.0"
9
+ VERSION = "3.2.0"
10
10
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hitimes
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Hinegardner
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-24 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: A fast, high resolution timer library for recording performance metrics.
13
13
  email: jeremy@copiousfreetime.org
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubygems_version: 3.6.3
67
+ rubygems_version: 4.0.10
68
68
  specification_version: 4
69
69
  summary: A fast, high resolution timer library for recording performance metrics.
70
70
  test_files: []