prometheus-client-mmap 1.6.1-aarch64-linux-gnu → 1.7.2-aarch64-linux-gnu

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: f2b3a291339292ab7b05ea6058e67f7fac4ea04c29842b714becec11d219e788
4
- data.tar.gz: 8044dd9d7115df81d03579f3731609d49e66ce650250caf124017493675e38bb
3
+ metadata.gz: ef6f7f621fb0f30c5515e987bad05c975389c1d284d91ee42c9e61c6e05a58b7
4
+ data.tar.gz: a6798cd74bd1bdde7b12270ce7067729e3eb87c1b15e3ee9c0ddb2e7ab5982dc
5
5
  SHA512:
6
- metadata.gz: 0ccac9afff457537b4b9160aa1c1affb4365bc596c93d808a3f0cfed9c44b32292cf30102755cbf45230440cefbf8db878f997c144126525468cf2c130f968b6
7
- data.tar.gz: '08b46c652e9b0df270fbd50b0cb0596bc60c084cd7d8abfd4b8c74f429e8b50abc9585f804ed0a280fc1ec73c99515f294ed1765fee5b16d7c6a0cab11ab358e'
6
+ metadata.gz: 125aba0482ff7ac18c29a6b332018b65663521612f99152784196ae2029de5487bc809fa4d9053e8433a455d5c0984a27dadb31e582783a33a6091b358dfbd35
7
+ data.tar.gz: 3e7434f20a028791a7de5017181b717d82e3a72ff2a04668669c5e9d75c597a3799cf9447420888abef79e5a970d13cf03b8deb2bd8ce404c2b7c258d9020a8b
data/Cargo.lock CHANGED
@@ -64,9 +64,9 @@ dependencies = [
64
64
 
65
65
  [[package]]
66
66
  name = "bstr"
67
- version = "1.13.0"
67
+ version = "1.13.1"
68
68
  source = "registry+https://github.com/rust-lang/crates.io-index"
69
- checksum = "1f7dc094d718f2e1c1559ad110e27eeaae14a5465d3d56dd6dbd793079fbd530"
69
+ checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
70
70
  dependencies = [
71
71
  "memchr",
72
72
  "regex-automata",
@@ -260,9 +260,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
260
260
 
261
261
  [[package]]
262
262
  name = "libc"
263
- version = "0.2.189"
263
+ version = "0.2.190"
264
264
  source = "registry+https://github.com/rust-lang/crates.io-index"
265
- checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
265
+ checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
266
266
 
267
267
  [[package]]
268
268
  name = "libloading"
@@ -282,9 +282,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
282
282
 
283
283
  [[package]]
284
284
  name = "magnus"
285
- version = "0.8.2"
285
+ version = "0.9.2"
286
286
  source = "registry+https://github.com/rust-lang/crates.io-index"
287
- checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012"
287
+ checksum = "b9068710e00d21be762edca59b9c4c8946dbdb29820d4f76ad559afea07982c9"
288
288
  dependencies = [
289
289
  "magnus-macros",
290
290
  "rb-sys",
@@ -294,9 +294,9 @@ dependencies = [
294
294
 
295
295
  [[package]]
296
296
  name = "magnus-macros"
297
- version = "0.8.0"
297
+ version = "0.9.1"
298
298
  source = "registry+https://github.com/rust-lang/crates.io-index"
299
- checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
299
+ checksum = "9dafde2eeb66f090e0f326112323eb8324b12cb32b5d1210e541d3df6b0ce77e"
300
300
  dependencies = [
301
301
  "proc-macro2",
302
302
  "quote",
@@ -433,18 +433,18 @@ dependencies = [
433
433
 
434
434
  [[package]]
435
435
  name = "rb-sys"
436
- version = "0.9.128"
436
+ version = "0.9.130"
437
437
  source = "registry+https://github.com/rust-lang/crates.io-index"
438
- checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
438
+ checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb"
439
439
  dependencies = [
440
440
  "rb-sys-build",
441
441
  ]
442
442
 
443
443
  [[package]]
444
444
  name = "rb-sys-build"
445
- version = "0.9.128"
445
+ version = "0.9.130"
446
446
  source = "registry+https://github.com/rust-lang/crates.io-index"
447
- checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
447
+ checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
448
448
  dependencies = [
449
449
  "bindgen",
450
450
  "lazy_static",
@@ -589,9 +589,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
589
589
 
590
590
  [[package]]
591
591
  name = "smallvec"
592
- version = "1.15.2"
592
+ version = "1.16.2"
593
593
  source = "registry+https://github.com/rust-lang/crates.io-index"
594
- checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
594
+ checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
595
595
  dependencies = [
596
596
  "serde",
597
597
  ]
@@ -633,18 +633,18 @@ dependencies = [
633
633
 
634
634
  [[package]]
635
635
  name = "thiserror"
636
- version = "2.0.19"
636
+ version = "2.0.21"
637
637
  source = "registry+https://github.com/rust-lang/crates.io-index"
638
- checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"
638
+ checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
639
639
  dependencies = [
640
640
  "thiserror-impl",
641
641
  ]
642
642
 
643
643
  [[package]]
644
644
  name = "thiserror-impl"
645
- version = "2.0.19"
645
+ version = "2.0.21"
646
646
  source = "registry+https://github.com/rust-lang/crates.io-index"
647
- checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"
647
+ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
648
648
  dependencies = [
649
649
  "proc-macro2",
650
650
  "quote",
data/README.md CHANGED
@@ -8,7 +8,7 @@ A suite of instrumentation metric primitives for Ruby that can be exposed
8
8
  through a HTTP interface. Intended to be used together with a
9
9
  [Prometheus server][1].
10
10
 
11
- [![Gem Version][4]](http://badge.fury.io/rb/prometheus-client-mmap)
11
+ [![Gem Version][4]](https://badge.fury.io/rb/prometheus-client-mmap)
12
12
  [![Build Status][3]](https://gitlab.com/gitlab-org/prometheus-client-mmap/commits/master)
13
13
 
14
14
  ## Installation
@@ -186,7 +186,8 @@ histogram.get({ service: 'users' })
186
186
  ### Summary
187
187
 
188
188
  Summary, similar to histograms, is an accumulator for samples. It captures
189
- Numeric data and provides an efficient percentile calculation mechanism.
189
+ Numeric data and keeps the sum and the count of the observations, exported as
190
+ `<name>_sum` and `<name>_count`. It does not calculate quantiles.
190
191
 
191
192
  ```ruby
192
193
  summary = Prometheus::Client::Summary.new(:service_latency_seconds, '...')
@@ -194,9 +195,9 @@ summary = Prometheus::Client::Summary.new(:service_latency_seconds, '...')
194
195
  # record a value
195
196
  summary.observe({ service: 'database' }, Benchmark.realtime { service.call() })
196
197
 
197
- # retrieve the current quantile values
198
+ # retrieve the sum of the recorded values for a given label set
198
199
  summary.get({ service: 'database' })
199
- # => { 0.5 => 0.1233122, 0.9 => 3.4323, 0.99 => 5.3428231 }
200
+ # => 5.3428231
200
201
  ```
201
202
 
202
203
  ## Configuration
@@ -275,7 +276,7 @@ pipeline for the tag completes.
275
276
  [1]: https://github.com/prometheus/prometheus
276
277
  [2]: http://rack.github.io/
277
278
  [3]: https://gitlab.com/gitlab-org/prometheus-client-mmap/badges/master/pipeline.svg
278
- [4]: https://badge.fury.io/rb/prometheus-client.svg
279
+ [4]: https://badge.fury.io/rb/prometheus-client-mmap.svg
279
280
  [8]: https://github.com/prometheus/pushgateway
280
281
  [9]: lib/prometheus/client/rack/exporter.rb
281
282
  [10]: lib/prometheus/client/rack/collector.rb
@@ -64,9 +64,9 @@ dependencies = [
64
64
 
65
65
  [[package]]
66
66
  name = "bstr"
67
- version = "1.13.0"
67
+ version = "1.13.1"
68
68
  source = "registry+https://github.com/rust-lang/crates.io-index"
69
- checksum = "1f7dc094d718f2e1c1559ad110e27eeaae14a5465d3d56dd6dbd793079fbd530"
69
+ checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
70
70
  dependencies = [
71
71
  "memchr",
72
72
  "regex-automata",
@@ -260,9 +260,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
260
260
 
261
261
  [[package]]
262
262
  name = "libc"
263
- version = "0.2.189"
263
+ version = "0.2.190"
264
264
  source = "registry+https://github.com/rust-lang/crates.io-index"
265
- checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
265
+ checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
266
266
 
267
267
  [[package]]
268
268
  name = "libloading"
@@ -282,9 +282,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
282
282
 
283
283
  [[package]]
284
284
  name = "magnus"
285
- version = "0.8.2"
285
+ version = "0.9.2"
286
286
  source = "registry+https://github.com/rust-lang/crates.io-index"
287
- checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012"
287
+ checksum = "b9068710e00d21be762edca59b9c4c8946dbdb29820d4f76ad559afea07982c9"
288
288
  dependencies = [
289
289
  "magnus-macros",
290
290
  "rb-sys",
@@ -294,9 +294,9 @@ dependencies = [
294
294
 
295
295
  [[package]]
296
296
  name = "magnus-macros"
297
- version = "0.8.0"
297
+ version = "0.9.1"
298
298
  source = "registry+https://github.com/rust-lang/crates.io-index"
299
- checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
299
+ checksum = "9dafde2eeb66f090e0f326112323eb8324b12cb32b5d1210e541d3df6b0ce77e"
300
300
  dependencies = [
301
301
  "proc-macro2",
302
302
  "quote",
@@ -433,18 +433,18 @@ dependencies = [
433
433
 
434
434
  [[package]]
435
435
  name = "rb-sys"
436
- version = "0.9.128"
436
+ version = "0.9.130"
437
437
  source = "registry+https://github.com/rust-lang/crates.io-index"
438
- checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
438
+ checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb"
439
439
  dependencies = [
440
440
  "rb-sys-build",
441
441
  ]
442
442
 
443
443
  [[package]]
444
444
  name = "rb-sys-build"
445
- version = "0.9.128"
445
+ version = "0.9.130"
446
446
  source = "registry+https://github.com/rust-lang/crates.io-index"
447
- checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
447
+ checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
448
448
  dependencies = [
449
449
  "bindgen",
450
450
  "lazy_static",
@@ -589,9 +589,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
589
589
 
590
590
  [[package]]
591
591
  name = "smallvec"
592
- version = "1.15.2"
592
+ version = "1.16.2"
593
593
  source = "registry+https://github.com/rust-lang/crates.io-index"
594
- checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
594
+ checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
595
595
  dependencies = [
596
596
  "serde",
597
597
  ]
@@ -633,18 +633,18 @@ dependencies = [
633
633
 
634
634
  [[package]]
635
635
  name = "thiserror"
636
- version = "2.0.19"
636
+ version = "2.0.21"
637
637
  source = "registry+https://github.com/rust-lang/crates.io-index"
638
- checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"
638
+ checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
639
639
  dependencies = [
640
640
  "thiserror-impl",
641
641
  ]
642
642
 
643
643
  [[package]]
644
644
  name = "thiserror-impl"
645
- version = "2.0.19"
645
+ version = "2.0.21"
646
646
  source = "registry+https://github.com/rust-lang/crates.io-index"
647
- checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"
647
+ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
648
648
  dependencies = [
649
649
  "proc-macro2",
650
650
  "quote",
@@ -8,7 +8,7 @@ edition = "2021"
8
8
  [dependencies]
9
9
  hashbrown = "0.17.0"
10
10
  libc = "0.2.172"
11
- magnus = { version = "0.8.2", features = ["rb-sys"] }
11
+ magnus = { version = "0.9.0", features = ["rb-sys"] }
12
12
  memmap2 = "0.9.5"
13
13
  # v0.26 cannot be built on CentOS 7 https://github.com/nix-rust/nix/issues/1972
14
14
  nix = { version = "0.25", features = ["mman"] } # mman used for MsFlags
@@ -22,7 +22,7 @@ thiserror = "2.0.12"
22
22
  bstr = "1.12"
23
23
  indoc = "2.0.6"
24
24
  # We need the `embed` feature to run tests, but this triggers failures when building as a Gem.
25
- magnus = { version = "0.8.2", features = ["rb-sys","embed"] }
25
+ magnus = { version = "0.9.0", features = ["rb-sys","embed"] }
26
26
  rand = "0.9.1"
27
27
  sha2 = "0.11.0"
28
28
  tempfile = "3.19.1"
@@ -49,8 +49,8 @@ impl EntryMap {
49
49
  buf.try_reserve(16_384)
50
50
  .map_err(|_| err!(no_mem_error(), "Couldn't allocate for {} memory", 16_384))?;
51
51
 
52
- for item in list_of_files.each() {
53
- let params = RArray::from_value(item?).expect("file list was not a Ruby Array");
52
+ for item in list_of_files.into_iter() {
53
+ let params = RArray::from_value(item).expect("file list was not a Ruby Array");
54
54
  if params.len() != 4 {
55
55
  return Err(err!(
56
56
  arg_error(),
Binary file
Binary file
Binary file
Binary file
@@ -57,25 +57,23 @@ module Prometheus
57
57
  end
58
58
  end
59
59
 
60
+ # Summary::Value keeps no quantiles, only the sum and the count.
60
61
  def summary(name, set, value)
61
- rv = value.get.map do |q, v|
62
- [name, set.merge(quantile: q), v]
63
- end
64
-
65
- rv << ["#{name}_sum", set, value.get.sum]
66
- rv << ["#{name}_count", set, value.get.total]
67
- rv
62
+ [
63
+ ["#{name}_sum", set, value.sum.get],
64
+ ["#{name}_count", set, value.total.get],
65
+ ]
68
66
  end
69
67
 
70
68
  def histogram(name, set, value)
71
69
  # |metric_name, labels, value|
72
70
  rv = value.get.map do |q, v|
73
- [name, set.merge(le: q), v]
71
+ ["#{name}_bucket", set.merge(le: q), v]
74
72
  end
75
73
 
76
- rv << [name, set.merge(le: '+Inf'), value.get.total]
77
- rv << ["#{name}_sum", set, value.get.sum]
78
- rv << ["#{name}_count", set, value.get.total]
74
+ rv << ["#{name}_bucket", set.merge(le: '+Inf'), value.total_inf.get]
75
+ rv << ["#{name}_sum", set, value.sum.get]
76
+ rv << ["#{name}_count", set, value.total.get]
79
77
  rv
80
78
  end
81
79
  end
@@ -12,9 +12,9 @@ module Prometheus
12
12
  @mutex = Mutex.new
13
13
  @validator = case type
14
14
  when :summary
15
- LabelSetValidator.new(['quantile'])
15
+ LabelSetValidator.new(%i[quantile])
16
16
  when :histogram
17
- LabelSetValidator.new(['le'])
17
+ LabelSetValidator.new(%i[le])
18
18
  else
19
19
  LabelSetValidator.new
20
20
  end
@@ -65,7 +65,7 @@ module Prometheus
65
65
  response = if Prometheus::Client.configuration.value_class.multiprocess
66
66
  format.marshal_multiprocess
67
67
  else
68
- format.marshal
68
+ format.marshal(@registry)
69
69
  end
70
70
  [
71
71
  200,
@@ -4,7 +4,8 @@ require 'prometheus/client/uses_value_type'
4
4
  module Prometheus
5
5
  module Client
6
6
  # Summary is an accumulator for samples. It captures Numeric data and
7
- # provides an efficient quantile calculation mechanism.
7
+ # keeps the sum and the count of the observations. It does not
8
+ # calculate quantiles.
8
9
  class Summary < Metric
9
10
  extend Gem::Deprecate
10
11
 
@@ -22,6 +23,12 @@ module Prometheus
22
23
  @sum.increment(value)
23
24
  @total.increment
24
25
  end
26
+
27
+ # Returns the sum of the observations, as Summary#get does for this
28
+ # label set.
29
+ def get
30
+ @sum.get
31
+ end
25
32
  end
26
33
 
27
34
  def initialize(name, docstring, base_labels = {})
@@ -50,15 +57,6 @@ module Prometheus
50
57
  end
51
58
  end
52
59
 
53
- # Returns all label sets with their values
54
- def values
55
- synchronize do
56
- @values.each_with_object({}) do |(labels, value), memo|
57
- memo[labels] = value.sum
58
- end
59
- end
60
- end
61
-
62
60
  private
63
61
 
64
62
  def default(labels)
@@ -1,5 +1,5 @@
1
1
  module Prometheus
2
2
  module Client
3
- VERSION = '1.6.1'.freeze
3
+ VERSION = '1.7.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus-client-mmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.7.2
5
5
  platform: aarch64-linux-gnu
6
6
  authors:
7
7
  - Tobias Schmidt
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2026-08-05 00:00:00.000000000 Z
14
+ date: 2026-10-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: base64
@@ -61,14 +61,14 @@ dependencies:
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: 0.9.128
64
+ version: 0.9.130
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: 0.9.128
71
+ version: 0.9.130
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: fuzzbert
74
74
  requirement: !ruby/object:Gem::Requirement
@@ -189,7 +189,6 @@ files:
189
189
  - ext/fast_mmaped_file_rs/src/raw_entry.rs
190
190
  - ext/fast_mmaped_file_rs/src/testhelper.rs
191
191
  - ext/fast_mmaped_file_rs/src/util.rs
192
- - lib/3.1/fast_mmaped_file_rs.so
193
192
  - lib/3.2/fast_mmaped_file_rs.so
194
193
  - lib/3.3/fast_mmaped_file_rs.so
195
194
  - lib/3.4/fast_mmaped_file_rs.so
@@ -235,7 +234,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
235
234
  requirements:
236
235
  - - ">="
237
236
  - !ruby/object:Gem::Version
238
- version: '3.1'
237
+ version: '3.2'
239
238
  - - "<"
240
239
  - !ruby/object:Gem::Version
241
240
  version: 4.1.dev
Binary file