prometheus-client-mmap 1.6.0 → 1.7.1
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 +4 -4
- data/Cargo.lock +46 -35
- data/ext/fast_mmaped_file_rs/Cargo.toml +2 -2
- data/ext/fast_mmaped_file_rs/src/map.rs +2 -2
- data/ext/fast_mmaped_file_rs/src/mmap.rs +6 -3
- data/lib/prometheus/client/formats/text.rb +4 -4
- data/lib/prometheus/client/metric.rb +2 -2
- data/lib/prometheus/client/version.rb +1 -1
- 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: 7b5c498fd358490972a9c83c9cdab567b2a934ee564f20e7ce061eade259c24d
|
|
4
|
+
data.tar.gz: fb742b9c13cbb68ec78365bc3cffdccc071b87bfd8d4ad208d67f23b44e44500
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 232a459c83853b13ff03d0d947cd877af10e39d9509140e107c6c74d476a5eac1c4fe1f8137478b126b201e6715d79478623fd4fe0a12fa7f386abbd52a2581c
|
|
7
|
+
data.tar.gz: 46e15e628e07b8b72ac51b6d830e899a6b2687c97167266470edb924507f8f640c0a68a40e3bfe9570b262cf37e3fe874c781466788a33b9bf044303a93a575e
|
data/Cargo.lock
CHANGED
|
@@ -38,7 +38,7 @@ dependencies = [
|
|
|
38
38
|
"regex",
|
|
39
39
|
"rustc-hash",
|
|
40
40
|
"shlex",
|
|
41
|
-
"syn",
|
|
41
|
+
"syn 2.0.101",
|
|
42
42
|
]
|
|
43
43
|
|
|
44
44
|
[[package]]
|
|
@@ -64,13 +64,13 @@ dependencies = [
|
|
|
64
64
|
|
|
65
65
|
[[package]]
|
|
66
66
|
name = "bstr"
|
|
67
|
-
version = "1.
|
|
67
|
+
version = "1.13.1"
|
|
68
68
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
69
|
-
checksum = "
|
|
69
|
+
checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
|
|
70
70
|
dependencies = [
|
|
71
71
|
"memchr",
|
|
72
72
|
"regex-automata",
|
|
73
|
-
"
|
|
73
|
+
"serde_core",
|
|
74
74
|
]
|
|
75
75
|
|
|
76
76
|
[[package]]
|
|
@@ -260,9 +260,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
|
260
260
|
|
|
261
261
|
[[package]]
|
|
262
262
|
name = "libc"
|
|
263
|
-
version = "0.2.
|
|
263
|
+
version = "0.2.190"
|
|
264
264
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
265
|
-
checksum = "
|
|
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.
|
|
285
|
+
version = "0.9.2"
|
|
286
286
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
287
|
-
checksum = "
|
|
287
|
+
checksum = "b9068710e00d21be762edca59b9c4c8946dbdb29820d4f76ad559afea07982c9"
|
|
288
288
|
dependencies = [
|
|
289
289
|
"magnus-macros",
|
|
290
290
|
"rb-sys",
|
|
@@ -294,13 +294,13 @@ dependencies = [
|
|
|
294
294
|
|
|
295
295
|
[[package]]
|
|
296
296
|
name = "magnus-macros"
|
|
297
|
-
version = "0.
|
|
297
|
+
version = "0.9.1"
|
|
298
298
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
299
|
-
checksum = "
|
|
299
|
+
checksum = "9dafde2eeb66f090e0f326112323eb8324b12cb32b5d1210e541d3df6b0ce77e"
|
|
300
300
|
dependencies = [
|
|
301
301
|
"proc-macro2",
|
|
302
302
|
"quote",
|
|
303
|
-
"syn",
|
|
303
|
+
"syn 2.0.101",
|
|
304
304
|
]
|
|
305
305
|
|
|
306
306
|
[[package]]
|
|
@@ -311,9 +311,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
|
|
311
311
|
|
|
312
312
|
[[package]]
|
|
313
313
|
name = "memmap2"
|
|
314
|
-
version = "0.9.
|
|
314
|
+
version = "0.9.11"
|
|
315
315
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
316
|
-
checksum = "
|
|
316
|
+
checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0"
|
|
317
317
|
dependencies = [
|
|
318
318
|
"libc",
|
|
319
319
|
]
|
|
@@ -433,18 +433,18 @@ dependencies = [
|
|
|
433
433
|
|
|
434
434
|
[[package]]
|
|
435
435
|
name = "rb-sys"
|
|
436
|
-
version = "0.9.
|
|
436
|
+
version = "0.9.130"
|
|
437
437
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
438
|
-
checksum = "
|
|
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.
|
|
445
|
+
version = "0.9.130"
|
|
446
446
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
447
|
-
checksum = "
|
|
447
|
+
checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
|
|
448
448
|
dependencies = [
|
|
449
449
|
"bindgen",
|
|
450
450
|
"lazy_static",
|
|
@@ -452,7 +452,7 @@ dependencies = [
|
|
|
452
452
|
"quote",
|
|
453
453
|
"regex",
|
|
454
454
|
"shell-words",
|
|
455
|
-
"syn",
|
|
455
|
+
"syn 2.0.101",
|
|
456
456
|
]
|
|
457
457
|
|
|
458
458
|
[[package]]
|
|
@@ -523,9 +523,9 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
|
|
|
523
523
|
|
|
524
524
|
[[package]]
|
|
525
525
|
name = "serde"
|
|
526
|
-
version = "1.0.
|
|
526
|
+
version = "1.0.229"
|
|
527
527
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
528
|
-
checksum = "
|
|
528
|
+
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
529
529
|
dependencies = [
|
|
530
530
|
"serde_core",
|
|
531
531
|
"serde_derive",
|
|
@@ -533,29 +533,29 @@ dependencies = [
|
|
|
533
533
|
|
|
534
534
|
[[package]]
|
|
535
535
|
name = "serde_core"
|
|
536
|
-
version = "1.0.
|
|
536
|
+
version = "1.0.229"
|
|
537
537
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
538
|
-
checksum = "
|
|
538
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
539
539
|
dependencies = [
|
|
540
540
|
"serde_derive",
|
|
541
541
|
]
|
|
542
542
|
|
|
543
543
|
[[package]]
|
|
544
544
|
name = "serde_derive"
|
|
545
|
-
version = "1.0.
|
|
545
|
+
version = "1.0.229"
|
|
546
546
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
547
|
-
checksum = "
|
|
547
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
548
548
|
dependencies = [
|
|
549
549
|
"proc-macro2",
|
|
550
550
|
"quote",
|
|
551
|
-
"syn",
|
|
551
|
+
"syn 3.0.3",
|
|
552
552
|
]
|
|
553
553
|
|
|
554
554
|
[[package]]
|
|
555
555
|
name = "serde_json"
|
|
556
|
-
version = "1.0.
|
|
556
|
+
version = "1.0.151"
|
|
557
557
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
558
|
-
checksum = "
|
|
558
|
+
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
|
559
559
|
dependencies = [
|
|
560
560
|
"itoa",
|
|
561
561
|
"memchr",
|
|
@@ -589,9 +589,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
|
589
589
|
|
|
590
590
|
[[package]]
|
|
591
591
|
name = "smallvec"
|
|
592
|
-
version = "1.
|
|
592
|
+
version = "1.16.2"
|
|
593
593
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
594
|
-
checksum = "
|
|
594
|
+
checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
|
|
595
595
|
dependencies = [
|
|
596
596
|
"serde",
|
|
597
597
|
]
|
|
@@ -607,6 +607,17 @@ dependencies = [
|
|
|
607
607
|
"unicode-ident",
|
|
608
608
|
]
|
|
609
609
|
|
|
610
|
+
[[package]]
|
|
611
|
+
name = "syn"
|
|
612
|
+
version = "3.0.3"
|
|
613
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
614
|
+
checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
|
|
615
|
+
dependencies = [
|
|
616
|
+
"proc-macro2",
|
|
617
|
+
"quote",
|
|
618
|
+
"unicode-ident",
|
|
619
|
+
]
|
|
620
|
+
|
|
610
621
|
[[package]]
|
|
611
622
|
name = "tempfile"
|
|
612
623
|
version = "3.27.0"
|
|
@@ -622,22 +633,22 @@ dependencies = [
|
|
|
622
633
|
|
|
623
634
|
[[package]]
|
|
624
635
|
name = "thiserror"
|
|
625
|
-
version = "2.0.
|
|
636
|
+
version = "2.0.21"
|
|
626
637
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
627
|
-
checksum = "
|
|
638
|
+
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
|
628
639
|
dependencies = [
|
|
629
640
|
"thiserror-impl",
|
|
630
641
|
]
|
|
631
642
|
|
|
632
643
|
[[package]]
|
|
633
644
|
name = "thiserror-impl"
|
|
634
|
-
version = "2.0.
|
|
645
|
+
version = "2.0.21"
|
|
635
646
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
636
|
-
checksum = "
|
|
647
|
+
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
637
648
|
dependencies = [
|
|
638
649
|
"proc-macro2",
|
|
639
650
|
"quote",
|
|
640
|
-
"syn",
|
|
651
|
+
"syn 3.0.3",
|
|
641
652
|
]
|
|
642
653
|
|
|
643
654
|
[[package]]
|
|
@@ -760,7 +771,7 @@ checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
|
|
|
760
771
|
dependencies = [
|
|
761
772
|
"proc-macro2",
|
|
762
773
|
"quote",
|
|
763
|
-
"syn",
|
|
774
|
+
"syn 2.0.101",
|
|
764
775
|
]
|
|
765
776
|
|
|
766
777
|
[[package]]
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
53
|
-
let params = RArray::from_value(item
|
|
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(),
|
|
@@ -535,9 +535,12 @@ impl MmapedFile {
|
|
|
535
535
|
fn track_rstring(&self, rb_self: Obj<Self>, str: RString) -> magnus::error::Result<()> {
|
|
536
536
|
let tracker: Value = rb_self.ivar_get("@weak_obj_tracker")?;
|
|
537
537
|
|
|
538
|
-
//
|
|
539
|
-
|
|
540
|
-
|
|
538
|
+
// Key the `WeakMap` on the string itself rather than on its address. An
|
|
539
|
+
// address goes stale as soon as GC compaction relocates the string: the
|
|
540
|
+
// entry keeps the old address, and a later string allocated into the
|
|
541
|
+
// recycled slot inserts under the same key and evicts this one, so
|
|
542
|
+
// `update_weak_map` stops fixing up a string that is still live.
|
|
543
|
+
let _: Value = tracker.funcall("[]=", (str, str))?;
|
|
541
544
|
Ok(())
|
|
542
545
|
}
|
|
543
546
|
|
|
@@ -70,12 +70,12 @@ module Prometheus
|
|
|
70
70
|
def histogram(name, set, value)
|
|
71
71
|
# |metric_name, labels, value|
|
|
72
72
|
rv = value.get.map do |q, v|
|
|
73
|
-
[name, set.merge(le: q), v]
|
|
73
|
+
["#{name}_bucket", set.merge(le: q), v]
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
rv << [name, set.merge(le: '+Inf'), value.get
|
|
77
|
-
rv << ["#{name}_sum", set, value.get
|
|
78
|
-
rv << ["#{name}_count", set, value.get
|
|
76
|
+
rv << ["#{name}_bucket", set.merge(le: '+Inf'), value.total_inf.get]
|
|
77
|
+
rv << ["#{name}_sum", set, value.sum.get]
|
|
78
|
+
rv << ["#{name}_count", set, value.total.get]
|
|
79
79
|
rv
|
|
80
80
|
end
|
|
81
81
|
end
|
|
@@ -12,9 +12,9 @@ module Prometheus
|
|
|
12
12
|
@mutex = Mutex.new
|
|
13
13
|
@validator = case type
|
|
14
14
|
when :summary
|
|
15
|
-
LabelSetValidator.new([
|
|
15
|
+
LabelSetValidator.new(%i[quantile])
|
|
16
16
|
when :histogram
|
|
17
|
-
LabelSetValidator.new([
|
|
17
|
+
LabelSetValidator.new(%i[le])
|
|
18
18
|
else
|
|
19
19
|
LabelSetValidator.new
|
|
20
20
|
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.
|
|
4
|
+
version: 1.7.1
|
|
5
5
|
platform: ruby
|
|
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-
|
|
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.
|
|
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.
|
|
71
|
+
version: 0.9.130
|
|
72
72
|
- !ruby/object:Gem::Dependency
|
|
73
73
|
name: fuzzbert
|
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -231,14 +231,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
231
231
|
requirements:
|
|
232
232
|
- - ">="
|
|
233
233
|
- !ruby/object:Gem::Version
|
|
234
|
-
version: '3.
|
|
234
|
+
version: '3.2'
|
|
235
235
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
236
|
requirements:
|
|
237
237
|
- - ">="
|
|
238
238
|
- !ruby/object:Gem::Version
|
|
239
239
|
version: '0'
|
|
240
240
|
requirements: []
|
|
241
|
-
rubygems_version: 3.
|
|
241
|
+
rubygems_version: 3.5.22
|
|
242
242
|
signing_key:
|
|
243
243
|
specification_version: 4
|
|
244
244
|
summary: A suite of instrumentation metric primitives that can be exposed through
|