prometheus-client-mmap 1.5.0-x86_64-linux-gnu → 1.6.0-x86_64-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: 56ae6cbc9d1f7b6b192a49083799a75102e5ead053933c5a00352016cb7ed2b7
4
- data.tar.gz: de1b112ae34dc4a01ebf5dee527ea36ac0bc2e354f684d61e5a3e9659aac0644
3
+ metadata.gz: 784d2cae57b49628d5e6667fa578aae77059bd15cdf7f0d02aedd57ae400b958
4
+ data.tar.gz: b1714d3498249f80e76e0664d9764fef09cdf7cb3c6efafaab63cd7106a45c71
5
5
  SHA512:
6
- metadata.gz: 866c529ea64c6f73f84bf88aa682f5e6782e6030f690cfd476af22dac3b3c84c164f4acbc8322a5af090ec414c5113ab57f7695cf39ebd16655b5971578f2e2c
7
- data.tar.gz: 4479a96183ecb1954d0ace6dc6b7b4cb6a7f5ce27e4bbc208a95aaac106a8d6db38441d5d630ee7bc9d2ac3306514349db26aeba51eb3752024f185dc856b391
6
+ metadata.gz: 46ff77e83bdd40345c9bcd818ac307d68e33f2c70d4640adef248d2dbcdb630a6b59798196a2adc5821bc7ee05169550d5ad8d2fc6d56c560c16f779ddf335b2
7
+ data.tar.gz: '092d47bdd877656529410457911cb278c03100a973d30415a368c091eda4eab2c0e35562bb6c5e9d9b6ddac329db4892ace94e09d6d56cb574f8c034038e2624'
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- rust 1.73.0
1
+ rust 1.89.0
data/Cargo.lock CHANGED
@@ -1,6 +1,6 @@
1
1
  # This file is automatically @generated by Cargo.
2
2
  # It is not intended for manual editing.
3
- version = 3
3
+ version = 4
4
4
 
5
5
  [[package]]
6
6
  name = "aho-corasick"
@@ -25,16 +25,14 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
25
25
 
26
26
  [[package]]
27
27
  name = "bindgen"
28
- version = "0.69.5"
28
+ version = "0.72.1"
29
29
  source = "registry+https://github.com/rust-lang/crates.io-index"
30
- checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
30
+ checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
31
31
  dependencies = [
32
32
  "bitflags 2.9.0",
33
33
  "cexpr",
34
34
  "clang-sys",
35
35
  "itertools",
36
- "lazy_static",
37
- "lazycell",
38
36
  "proc-macro2",
39
37
  "quote",
40
38
  "regex",
@@ -57,18 +55,18 @@ checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
57
55
 
58
56
  [[package]]
59
57
  name = "block-buffer"
60
- version = "0.10.4"
58
+ version = "0.12.1"
61
59
  source = "registry+https://github.com/rust-lang/crates.io-index"
62
- checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
60
+ checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
63
61
  dependencies = [
64
- "generic-array",
62
+ "hybrid-array",
65
63
  ]
66
64
 
67
65
  [[package]]
68
66
  name = "bstr"
69
- version = "1.12.0"
67
+ version = "1.12.1"
70
68
  source = "registry+https://github.com/rust-lang/crates.io-index"
71
- checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
69
+ checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab"
72
70
  dependencies = [
73
71
  "memchr",
74
72
  "regex-automata",
@@ -101,32 +99,38 @@ dependencies = [
101
99
  "libloading",
102
100
  ]
103
101
 
102
+ [[package]]
103
+ name = "const-oid"
104
+ version = "0.10.2"
105
+ source = "registry+https://github.com/rust-lang/crates.io-index"
106
+ checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
107
+
104
108
  [[package]]
105
109
  name = "cpufeatures"
106
- version = "0.2.17"
110
+ version = "0.3.0"
107
111
  source = "registry+https://github.com/rust-lang/crates.io-index"
108
- checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
112
+ checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
109
113
  dependencies = [
110
114
  "libc",
111
115
  ]
112
116
 
113
117
  [[package]]
114
118
  name = "crypto-common"
115
- version = "0.1.6"
119
+ version = "0.2.2"
116
120
  source = "registry+https://github.com/rust-lang/crates.io-index"
117
- checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
121
+ checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
118
122
  dependencies = [
119
- "generic-array",
120
- "typenum",
123
+ "hybrid-array",
121
124
  ]
122
125
 
123
126
  [[package]]
124
127
  name = "digest"
125
- version = "0.10.7"
128
+ version = "0.11.3"
126
129
  source = "registry+https://github.com/rust-lang/crates.io-index"
127
- checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
130
+ checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
128
131
  dependencies = [
129
132
  "block-buffer",
133
+ "const-oid",
130
134
  "crypto-common",
131
135
  ]
132
136
 
@@ -182,19 +186,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
182
186
 
183
187
  [[package]]
184
188
  name = "foldhash"
185
- version = "0.1.5"
189
+ version = "0.2.0"
186
190
  source = "registry+https://github.com/rust-lang/crates.io-index"
187
- checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
188
-
189
- [[package]]
190
- name = "generic-array"
191
- version = "0.14.7"
192
- source = "registry+https://github.com/rust-lang/crates.io-index"
193
- checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
194
- dependencies = [
195
- "typenum",
196
- "version_check",
197
- ]
191
+ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
198
192
 
199
193
  [[package]]
200
194
  name = "getrandom"
@@ -216,20 +210,32 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
216
210
 
217
211
  [[package]]
218
212
  name = "hashbrown"
219
- version = "0.15.3"
213
+ version = "0.17.1"
220
214
  source = "registry+https://github.com/rust-lang/crates.io-index"
221
- checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
215
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
222
216
  dependencies = [
223
217
  "allocator-api2",
224
218
  "equivalent",
225
219
  "foldhash",
226
220
  ]
227
221
 
222
+ [[package]]
223
+ name = "hybrid-array"
224
+ version = "0.4.12"
225
+ source = "registry+https://github.com/rust-lang/crates.io-index"
226
+ checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da"
227
+ dependencies = [
228
+ "typenum",
229
+ ]
230
+
228
231
  [[package]]
229
232
  name = "indoc"
230
- version = "2.0.6"
233
+ version = "2.0.7"
231
234
  source = "registry+https://github.com/rust-lang/crates.io-index"
232
- checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
235
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
236
+ dependencies = [
237
+ "rustversion",
238
+ ]
233
239
 
234
240
  [[package]]
235
241
  name = "itertools"
@@ -252,17 +258,11 @@ version = "1.5.0"
252
258
  source = "registry+https://github.com/rust-lang/crates.io-index"
253
259
  checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
254
260
 
255
- [[package]]
256
- name = "lazycell"
257
- version = "1.3.0"
258
- source = "registry+https://github.com/rust-lang/crates.io-index"
259
- checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
260
-
261
261
  [[package]]
262
262
  name = "libc"
263
- version = "0.2.172"
263
+ version = "0.2.186"
264
264
  source = "registry+https://github.com/rust-lang/crates.io-index"
265
- checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
265
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
266
266
 
267
267
  [[package]]
268
268
  name = "libloading"
@@ -276,9 +276,9 @@ dependencies = [
276
276
 
277
277
  [[package]]
278
278
  name = "linux-raw-sys"
279
- version = "0.9.4"
279
+ version = "0.12.1"
280
280
  source = "registry+https://github.com/rust-lang/crates.io-index"
281
- checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
281
+ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
282
282
 
283
283
  [[package]]
284
284
  name = "magnus"
@@ -311,9 +311,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
311
311
 
312
312
  [[package]]
313
313
  name = "memmap2"
314
- version = "0.9.5"
314
+ version = "0.9.10"
315
315
  source = "registry+https://github.com/rust-lang/crates.io-index"
316
- checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f"
316
+ checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3"
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.117"
436
+ version = "0.9.128"
437
437
  source = "registry+https://github.com/rust-lang/crates.io-index"
438
- checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44"
438
+ checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
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.117"
445
+ version = "0.9.128"
446
446
  source = "registry+https://github.com/rust-lang/crates.io-index"
447
- checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59"
447
+ checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
448
448
  dependencies = [
449
449
  "bindgen",
450
450
  "lazy_static",
@@ -457,9 +457,9 @@ dependencies = [
457
457
 
458
458
  [[package]]
459
459
  name = "rb-sys-env"
460
- version = "0.2.2"
460
+ version = "0.2.3"
461
461
  source = "registry+https://github.com/rust-lang/crates.io-index"
462
- checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6"
462
+ checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
463
463
 
464
464
  [[package]]
465
465
  name = "regex"
@@ -492,15 +492,15 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
492
492
 
493
493
  [[package]]
494
494
  name = "rustc-hash"
495
- version = "1.1.0"
495
+ version = "2.1.2"
496
496
  source = "registry+https://github.com/rust-lang/crates.io-index"
497
- checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
497
+ checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
498
498
 
499
499
  [[package]]
500
500
  name = "rustix"
501
- version = "1.0.7"
501
+ version = "1.1.4"
502
502
  source = "registry+https://github.com/rust-lang/crates.io-index"
503
- checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
503
+ checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
504
504
  dependencies = [
505
505
  "bitflags 2.9.0",
506
506
  "errno",
@@ -510,10 +510,10 @@ dependencies = [
510
510
  ]
511
511
 
512
512
  [[package]]
513
- name = "ryu"
514
- version = "1.0.20"
513
+ name = "rustversion"
514
+ version = "1.0.22"
515
515
  source = "registry+https://github.com/rust-lang/crates.io-index"
516
- checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
516
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
517
517
 
518
518
  [[package]]
519
519
  name = "seq-macro"
@@ -523,18 +523,28 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
523
523
 
524
524
  [[package]]
525
525
  name = "serde"
526
- version = "1.0.219"
526
+ version = "1.0.228"
527
+ source = "registry+https://github.com/rust-lang/crates.io-index"
528
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
529
+ dependencies = [
530
+ "serde_core",
531
+ "serde_derive",
532
+ ]
533
+
534
+ [[package]]
535
+ name = "serde_core"
536
+ version = "1.0.228"
527
537
  source = "registry+https://github.com/rust-lang/crates.io-index"
528
- checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
538
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
529
539
  dependencies = [
530
540
  "serde_derive",
531
541
  ]
532
542
 
533
543
  [[package]]
534
544
  name = "serde_derive"
535
- version = "1.0.219"
545
+ version = "1.0.228"
536
546
  source = "registry+https://github.com/rust-lang/crates.io-index"
537
- checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
547
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
538
548
  dependencies = [
539
549
  "proc-macro2",
540
550
  "quote",
@@ -543,21 +553,22 @@ dependencies = [
543
553
 
544
554
  [[package]]
545
555
  name = "serde_json"
546
- version = "1.0.140"
556
+ version = "1.0.150"
547
557
  source = "registry+https://github.com/rust-lang/crates.io-index"
548
- checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
558
+ checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
549
559
  dependencies = [
550
560
  "itoa",
551
561
  "memchr",
552
- "ryu",
553
562
  "serde",
563
+ "serde_core",
564
+ "zmij",
554
565
  ]
555
566
 
556
567
  [[package]]
557
568
  name = "sha2"
558
- version = "0.10.9"
569
+ version = "0.11.0"
559
570
  source = "registry+https://github.com/rust-lang/crates.io-index"
560
- checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
571
+ checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
561
572
  dependencies = [
562
573
  "cfg-if",
563
574
  "cpufeatures",
@@ -578,9 +589,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
578
589
 
579
590
  [[package]]
580
591
  name = "smallvec"
581
- version = "1.15.0"
592
+ version = "1.15.2"
582
593
  source = "registry+https://github.com/rust-lang/crates.io-index"
583
- checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9"
594
+ checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
584
595
  dependencies = [
585
596
  "serde",
586
597
  ]
@@ -598,9 +609,9 @@ dependencies = [
598
609
 
599
610
  [[package]]
600
611
  name = "tempfile"
601
- version = "3.19.1"
612
+ version = "3.27.0"
602
613
  source = "registry+https://github.com/rust-lang/crates.io-index"
603
- checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
614
+ checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
604
615
  dependencies = [
605
616
  "fastrand",
606
617
  "getrandom",
@@ -611,18 +622,18 @@ dependencies = [
611
622
 
612
623
  [[package]]
613
624
  name = "thiserror"
614
- version = "2.0.12"
625
+ version = "2.0.18"
615
626
  source = "registry+https://github.com/rust-lang/crates.io-index"
616
- checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
627
+ checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
617
628
  dependencies = [
618
629
  "thiserror-impl",
619
630
  ]
620
631
 
621
632
  [[package]]
622
633
  name = "thiserror-impl"
623
- version = "2.0.12"
634
+ version = "2.0.18"
624
635
  source = "registry+https://github.com/rust-lang/crates.io-index"
625
- checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
636
+ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
626
637
  dependencies = [
627
638
  "proc-macro2",
628
639
  "quote",
@@ -631,9 +642,9 @@ dependencies = [
631
642
 
632
643
  [[package]]
633
644
  name = "typenum"
634
- version = "1.18.0"
645
+ version = "1.20.1"
635
646
  source = "registry+https://github.com/rust-lang/crates.io-index"
636
- checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
647
+ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
637
648
 
638
649
  [[package]]
639
650
  name = "unicode-ident"
@@ -641,12 +652,6 @@ version = "1.0.18"
641
652
  source = "registry+https://github.com/rust-lang/crates.io-index"
642
653
  checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
643
654
 
644
- [[package]]
645
- name = "version_check"
646
- version = "0.9.5"
647
- source = "registry+https://github.com/rust-lang/crates.io-index"
648
- checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
649
-
650
655
  [[package]]
651
656
  name = "wasi"
652
657
  version = "0.14.2+wasi-0.2.4"
@@ -757,3 +762,9 @@ dependencies = [
757
762
  "quote",
758
763
  "syn",
759
764
  ]
765
+
766
+ [[package]]
767
+ name = "zmij"
768
+ version = "1.0.21"
769
+ source = "registry+https://github.com/rust-lang/crates.io-index"
770
+ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
@@ -1,6 +1,6 @@
1
1
  # This file is automatically @generated by Cargo.
2
2
  # It is not intended for manual editing.
3
- version = 3
3
+ version = 4
4
4
 
5
5
  [[package]]
6
6
  name = "aho-corasick"
@@ -25,16 +25,14 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
25
25
 
26
26
  [[package]]
27
27
  name = "bindgen"
28
- version = "0.69.5"
28
+ version = "0.72.1"
29
29
  source = "registry+https://github.com/rust-lang/crates.io-index"
30
- checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
30
+ checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
31
31
  dependencies = [
32
32
  "bitflags 2.9.0",
33
33
  "cexpr",
34
34
  "clang-sys",
35
35
  "itertools",
36
- "lazy_static",
37
- "lazycell",
38
36
  "proc-macro2",
39
37
  "quote",
40
38
  "regex",
@@ -57,18 +55,18 @@ checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
57
55
 
58
56
  [[package]]
59
57
  name = "block-buffer"
60
- version = "0.10.4"
58
+ version = "0.12.1"
61
59
  source = "registry+https://github.com/rust-lang/crates.io-index"
62
- checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
60
+ checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
63
61
  dependencies = [
64
- "generic-array",
62
+ "hybrid-array",
65
63
  ]
66
64
 
67
65
  [[package]]
68
66
  name = "bstr"
69
- version = "1.12.0"
67
+ version = "1.12.1"
70
68
  source = "registry+https://github.com/rust-lang/crates.io-index"
71
- checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
69
+ checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab"
72
70
  dependencies = [
73
71
  "memchr",
74
72
  "regex-automata",
@@ -101,32 +99,38 @@ dependencies = [
101
99
  "libloading",
102
100
  ]
103
101
 
102
+ [[package]]
103
+ name = "const-oid"
104
+ version = "0.10.2"
105
+ source = "registry+https://github.com/rust-lang/crates.io-index"
106
+ checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
107
+
104
108
  [[package]]
105
109
  name = "cpufeatures"
106
- version = "0.2.17"
110
+ version = "0.3.0"
107
111
  source = "registry+https://github.com/rust-lang/crates.io-index"
108
- checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
112
+ checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
109
113
  dependencies = [
110
114
  "libc",
111
115
  ]
112
116
 
113
117
  [[package]]
114
118
  name = "crypto-common"
115
- version = "0.1.6"
119
+ version = "0.2.2"
116
120
  source = "registry+https://github.com/rust-lang/crates.io-index"
117
- checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
121
+ checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
118
122
  dependencies = [
119
- "generic-array",
120
- "typenum",
123
+ "hybrid-array",
121
124
  ]
122
125
 
123
126
  [[package]]
124
127
  name = "digest"
125
- version = "0.10.7"
128
+ version = "0.11.3"
126
129
  source = "registry+https://github.com/rust-lang/crates.io-index"
127
- checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
130
+ checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
128
131
  dependencies = [
129
132
  "block-buffer",
133
+ "const-oid",
130
134
  "crypto-common",
131
135
  ]
132
136
 
@@ -182,19 +186,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
182
186
 
183
187
  [[package]]
184
188
  name = "foldhash"
185
- version = "0.1.5"
189
+ version = "0.2.0"
186
190
  source = "registry+https://github.com/rust-lang/crates.io-index"
187
- checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
188
-
189
- [[package]]
190
- name = "generic-array"
191
- version = "0.14.7"
192
- source = "registry+https://github.com/rust-lang/crates.io-index"
193
- checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
194
- dependencies = [
195
- "typenum",
196
- "version_check",
197
- ]
191
+ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
198
192
 
199
193
  [[package]]
200
194
  name = "getrandom"
@@ -216,20 +210,32 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
216
210
 
217
211
  [[package]]
218
212
  name = "hashbrown"
219
- version = "0.15.3"
213
+ version = "0.17.1"
220
214
  source = "registry+https://github.com/rust-lang/crates.io-index"
221
- checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
215
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
222
216
  dependencies = [
223
217
  "allocator-api2",
224
218
  "equivalent",
225
219
  "foldhash",
226
220
  ]
227
221
 
222
+ [[package]]
223
+ name = "hybrid-array"
224
+ version = "0.4.12"
225
+ source = "registry+https://github.com/rust-lang/crates.io-index"
226
+ checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da"
227
+ dependencies = [
228
+ "typenum",
229
+ ]
230
+
228
231
  [[package]]
229
232
  name = "indoc"
230
- version = "2.0.6"
233
+ version = "2.0.7"
231
234
  source = "registry+https://github.com/rust-lang/crates.io-index"
232
- checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
235
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
236
+ dependencies = [
237
+ "rustversion",
238
+ ]
233
239
 
234
240
  [[package]]
235
241
  name = "itertools"
@@ -252,17 +258,11 @@ version = "1.5.0"
252
258
  source = "registry+https://github.com/rust-lang/crates.io-index"
253
259
  checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
254
260
 
255
- [[package]]
256
- name = "lazycell"
257
- version = "1.3.0"
258
- source = "registry+https://github.com/rust-lang/crates.io-index"
259
- checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
260
-
261
261
  [[package]]
262
262
  name = "libc"
263
- version = "0.2.172"
263
+ version = "0.2.186"
264
264
  source = "registry+https://github.com/rust-lang/crates.io-index"
265
- checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
265
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
266
266
 
267
267
  [[package]]
268
268
  name = "libloading"
@@ -276,9 +276,9 @@ dependencies = [
276
276
 
277
277
  [[package]]
278
278
  name = "linux-raw-sys"
279
- version = "0.9.4"
279
+ version = "0.12.1"
280
280
  source = "registry+https://github.com/rust-lang/crates.io-index"
281
- checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
281
+ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
282
282
 
283
283
  [[package]]
284
284
  name = "magnus"
@@ -311,9 +311,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
311
311
 
312
312
  [[package]]
313
313
  name = "memmap2"
314
- version = "0.9.5"
314
+ version = "0.9.10"
315
315
  source = "registry+https://github.com/rust-lang/crates.io-index"
316
- checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f"
316
+ checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3"
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.117"
436
+ version = "0.9.128"
437
437
  source = "registry+https://github.com/rust-lang/crates.io-index"
438
- checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44"
438
+ checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
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.117"
445
+ version = "0.9.128"
446
446
  source = "registry+https://github.com/rust-lang/crates.io-index"
447
- checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59"
447
+ checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
448
448
  dependencies = [
449
449
  "bindgen",
450
450
  "lazy_static",
@@ -457,9 +457,9 @@ dependencies = [
457
457
 
458
458
  [[package]]
459
459
  name = "rb-sys-env"
460
- version = "0.2.2"
460
+ version = "0.2.3"
461
461
  source = "registry+https://github.com/rust-lang/crates.io-index"
462
- checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6"
462
+ checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
463
463
 
464
464
  [[package]]
465
465
  name = "regex"
@@ -492,15 +492,15 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
492
492
 
493
493
  [[package]]
494
494
  name = "rustc-hash"
495
- version = "1.1.0"
495
+ version = "2.1.2"
496
496
  source = "registry+https://github.com/rust-lang/crates.io-index"
497
- checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
497
+ checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
498
498
 
499
499
  [[package]]
500
500
  name = "rustix"
501
- version = "1.0.7"
501
+ version = "1.1.4"
502
502
  source = "registry+https://github.com/rust-lang/crates.io-index"
503
- checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
503
+ checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
504
504
  dependencies = [
505
505
  "bitflags 2.9.0",
506
506
  "errno",
@@ -510,10 +510,10 @@ dependencies = [
510
510
  ]
511
511
 
512
512
  [[package]]
513
- name = "ryu"
514
- version = "1.0.20"
513
+ name = "rustversion"
514
+ version = "1.0.22"
515
515
  source = "registry+https://github.com/rust-lang/crates.io-index"
516
- checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
516
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
517
517
 
518
518
  [[package]]
519
519
  name = "seq-macro"
@@ -523,18 +523,28 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
523
523
 
524
524
  [[package]]
525
525
  name = "serde"
526
- version = "1.0.219"
526
+ version = "1.0.228"
527
+ source = "registry+https://github.com/rust-lang/crates.io-index"
528
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
529
+ dependencies = [
530
+ "serde_core",
531
+ "serde_derive",
532
+ ]
533
+
534
+ [[package]]
535
+ name = "serde_core"
536
+ version = "1.0.228"
527
537
  source = "registry+https://github.com/rust-lang/crates.io-index"
528
- checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
538
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
529
539
  dependencies = [
530
540
  "serde_derive",
531
541
  ]
532
542
 
533
543
  [[package]]
534
544
  name = "serde_derive"
535
- version = "1.0.219"
545
+ version = "1.0.228"
536
546
  source = "registry+https://github.com/rust-lang/crates.io-index"
537
- checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
547
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
538
548
  dependencies = [
539
549
  "proc-macro2",
540
550
  "quote",
@@ -543,21 +553,22 @@ dependencies = [
543
553
 
544
554
  [[package]]
545
555
  name = "serde_json"
546
- version = "1.0.140"
556
+ version = "1.0.150"
547
557
  source = "registry+https://github.com/rust-lang/crates.io-index"
548
- checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
558
+ checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
549
559
  dependencies = [
550
560
  "itoa",
551
561
  "memchr",
552
- "ryu",
553
562
  "serde",
563
+ "serde_core",
564
+ "zmij",
554
565
  ]
555
566
 
556
567
  [[package]]
557
568
  name = "sha2"
558
- version = "0.10.9"
569
+ version = "0.11.0"
559
570
  source = "registry+https://github.com/rust-lang/crates.io-index"
560
- checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
571
+ checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
561
572
  dependencies = [
562
573
  "cfg-if",
563
574
  "cpufeatures",
@@ -578,9 +589,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
578
589
 
579
590
  [[package]]
580
591
  name = "smallvec"
581
- version = "1.15.0"
592
+ version = "1.15.2"
582
593
  source = "registry+https://github.com/rust-lang/crates.io-index"
583
- checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9"
594
+ checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
584
595
  dependencies = [
585
596
  "serde",
586
597
  ]
@@ -598,9 +609,9 @@ dependencies = [
598
609
 
599
610
  [[package]]
600
611
  name = "tempfile"
601
- version = "3.19.1"
612
+ version = "3.27.0"
602
613
  source = "registry+https://github.com/rust-lang/crates.io-index"
603
- checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
614
+ checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
604
615
  dependencies = [
605
616
  "fastrand",
606
617
  "getrandom",
@@ -611,18 +622,18 @@ dependencies = [
611
622
 
612
623
  [[package]]
613
624
  name = "thiserror"
614
- version = "2.0.12"
625
+ version = "2.0.18"
615
626
  source = "registry+https://github.com/rust-lang/crates.io-index"
616
- checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
627
+ checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
617
628
  dependencies = [
618
629
  "thiserror-impl",
619
630
  ]
620
631
 
621
632
  [[package]]
622
633
  name = "thiserror-impl"
623
- version = "2.0.12"
634
+ version = "2.0.18"
624
635
  source = "registry+https://github.com/rust-lang/crates.io-index"
625
- checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
636
+ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
626
637
  dependencies = [
627
638
  "proc-macro2",
628
639
  "quote",
@@ -631,9 +642,9 @@ dependencies = [
631
642
 
632
643
  [[package]]
633
644
  name = "typenum"
634
- version = "1.18.0"
645
+ version = "1.20.1"
635
646
  source = "registry+https://github.com/rust-lang/crates.io-index"
636
- checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
647
+ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
637
648
 
638
649
  [[package]]
639
650
  name = "unicode-ident"
@@ -641,12 +652,6 @@ version = "1.0.18"
641
652
  source = "registry+https://github.com/rust-lang/crates.io-index"
642
653
  checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
643
654
 
644
- [[package]]
645
- name = "version_check"
646
- version = "0.9.5"
647
- source = "registry+https://github.com/rust-lang/crates.io-index"
648
- checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
649
-
650
655
  [[package]]
651
656
  name = "wasi"
652
657
  version = "0.14.2+wasi-0.2.4"
@@ -757,3 +762,9 @@ dependencies = [
757
762
  "quote",
758
763
  "syn",
759
764
  ]
765
+
766
+ [[package]]
767
+ name = "zmij"
768
+ version = "1.0.21"
769
+ source = "registry+https://github.com/rust-lang/crates.io-index"
770
+ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
@@ -6,13 +6,13 @@ edition = "2021"
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
7
 
8
8
  [dependencies]
9
- hashbrown = "0.15.3"
9
+ hashbrown = "0.17.0"
10
10
  libc = "0.2.172"
11
11
  magnus = { version = "0.8.2", 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
15
- rb-sys = { version = "0.9.117", features = ["stable-api-compiled-fallback"] }
15
+ rb-sys = { version = "0.9.128", features = ["stable-api-compiled-fallback"] }
16
16
  serde = { version = "1.0.219", features = ["derive"] }
17
17
  serde_json = { version = "1.0.140", features = ["raw_value"] }
18
18
  smallvec = { version = "1.15", features = ["serde"] }
@@ -24,7 +24,7 @@ indoc = "2.0.6"
24
24
  # We need the `embed` feature to run tests, but this triggers failures when building as a Gem.
25
25
  magnus = { version = "0.8.2", features = ["rb-sys","embed"] }
26
26
  rand = "0.9.1"
27
- sha2 = "0.10.9"
27
+ sha2 = "0.11.0"
28
28
  tempfile = "3.19.1"
29
29
 
30
30
  [build-dependencies]
@@ -1,11 +1,12 @@
1
1
  use hashbrown::hash_map::RawEntryMut;
2
2
  use hashbrown::HashMap;
3
3
  use magnus::{exception::*, Error, RArray};
4
+ use std::cmp::Ordering;
4
5
  use std::hash::{BuildHasher, Hash, Hasher};
5
6
  use std::mem::size_of;
6
7
 
7
8
  use crate::error::MmapError;
8
- use crate::file_entry::{BorrowedData, EntryData, EntryMetadata, FileEntry};
9
+ use crate::file_entry::{BorrowedData, EntryData, EntryMetadata, FileEntry, MetricText};
9
10
  use crate::file_info::FileInfo;
10
11
  use crate::raw_entry::RawEntry;
11
12
  use crate::util::read_u32;
@@ -67,29 +68,43 @@ impl EntryMap {
67
68
  Ok(())
68
69
  }
69
70
 
70
- /// Consume the `EntryMap` and convert the key/value into`FileEntry`
71
- /// objects, sorting them by their JSON strings.
71
+ /// Consume the `EntryMap` and convert the key/value into `FileEntry`
72
+ /// objects, ordering them so entries are grouped by metric and, for
73
+ /// histogram buckets, sorted by the numeric value of their `le` label.
74
+ ///
75
+ /// Sorting the raw JSON strings lexicographically places `le="50"` after
76
+ /// `le="1000"` and `le="+Inf"` first, which breaks the requirement that
77
+ /// histogram buckets are exposed in increasing `le` order (and trips up
78
+ /// strict consumers such as the Elasticsearch `histogram` field type). We
79
+ /// instead build a sort key that compares the `le` label numerically.
72
80
  pub fn into_sorted(self) -> Result<Vec<FileEntry>> {
73
- let mut sorted = Vec::new();
81
+ let mut decorated = Vec::new();
74
82
 
75
83
  // To match the behavior of the C version, pre-allocate the entries
76
84
  // and check for allocation failure. Generally idiomatic Rust would
77
85
  // `collect` the iterator into a new `Vec` in place, but this panics
78
86
  // if it can't allocate and we want to continue execution in that
79
87
  // scenario.
80
- if sorted.try_reserve_exact(self.0.len()).is_err() {
88
+ if decorated.try_reserve_exact(self.0.len()).is_err() {
81
89
  return Err(MmapError::OutOfMemory(
82
- self.0.len() * size_of::<FileEntry>(),
90
+ self.0.len() * (size_of::<FileEntry>() + size_of::<SortKey>()),
83
91
  ));
84
92
  }
85
93
 
86
- sorted.extend(
87
- self.0
88
- .into_iter()
89
- .map(|(data, meta)| FileEntry { data, meta }),
90
- );
94
+ decorated.extend(self.0.into_iter().map(|(data, meta)| {
95
+ let key = SortKey::from_entry(&data);
96
+ (key, FileEntry { data, meta })
97
+ }));
98
+
99
+ decorated.sort_unstable_by(|x, y| x.0.cmp(&y.0));
91
100
 
92
- sorted.sort_unstable_by(|x, y| x.data.cmp(&y.data));
101
+ let mut sorted = Vec::new();
102
+ if sorted.try_reserve_exact(decorated.len()).is_err() {
103
+ return Err(MmapError::OutOfMemory(
104
+ decorated.len() * size_of::<FileEntry>(),
105
+ ));
106
+ }
107
+ sorted.extend(decorated.into_iter().map(|(_, entry)| entry));
93
108
 
94
109
  Ok(sorted)
95
110
  }
@@ -164,6 +179,90 @@ impl EntryMap {
164
179
  }
165
180
  }
166
181
 
182
+ /// Comparison key used to order entries for text exposition.
183
+ ///
184
+ /// `grouping` holds the metric family, name, and every label *except* `le`, so
185
+ /// all buckets of the same series sort together. `le` then orders a histogram's
186
+ /// buckets numerically (`+Inf` last) rather than lexicographically. `pid`
187
+ /// preserves the previous tie-breaking behavior for `all` multiprocess metrics.
188
+ struct SortKey {
189
+ grouping: String,
190
+ le: f64,
191
+ pid: Option<String>,
192
+ }
193
+
194
+ impl SortKey {
195
+ fn from_entry(data: &EntryData) -> Self {
196
+ let mut grouping = String::new();
197
+ // Entries without an `le` label (everything but histogram buckets) keep
198
+ // their relative order via `grouping` alone; the constant `le` is never
199
+ // the deciding factor for them.
200
+ let mut le = f64::NEG_INFINITY;
201
+
202
+ match serde_json::from_str::<MetricText>(&data.json) {
203
+ Ok(m) if m.labels.len() == m.values.len() => {
204
+ grouping.push_str(m.family_name);
205
+ grouping.push('\u{1}');
206
+ grouping.push_str(m.metric_name);
207
+
208
+ for (label, value) in m.labels.iter().zip(m.values.iter()) {
209
+ if *label == "le" {
210
+ le = parse_le(value.get());
211
+ continue;
212
+ }
213
+ grouping.push('\u{1}');
214
+ grouping.push_str(label);
215
+ grouping.push('\u{2}');
216
+ grouping.push_str(value.get());
217
+ }
218
+ }
219
+ // Malformed or unexpected JSON: fall back to ordering by the raw
220
+ // string, matching the previous lexicographic behavior. Such
221
+ // entries are dropped later in `entries_to_string`.
222
+ _ => grouping.push_str(&data.json),
223
+ }
224
+
225
+ SortKey {
226
+ grouping,
227
+ le,
228
+ pid: data.pid.clone(),
229
+ }
230
+ }
231
+ }
232
+
233
+ impl PartialEq for SortKey {
234
+ fn eq(&self, other: &Self) -> bool {
235
+ self.cmp(other) == Ordering::Equal
236
+ }
237
+ }
238
+
239
+ impl Eq for SortKey {}
240
+
241
+ impl PartialOrd for SortKey {
242
+ fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
243
+ Some(self.cmp(other))
244
+ }
245
+ }
246
+
247
+ impl Ord for SortKey {
248
+ fn cmp(&self, other: &Self) -> Ordering {
249
+ self.grouping
250
+ .cmp(&other.grouping)
251
+ .then_with(|| self.le.total_cmp(&other.le))
252
+ .then_with(|| self.pid.cmp(&other.pid))
253
+ }
254
+ }
255
+
256
+ /// Parse the value of a histogram `le` label, stored as a JSON string such as
257
+ /// `"10"` or `"+Inf"`.
258
+ fn parse_le(raw_value: &str) -> f64 {
259
+ match raw_value.trim_matches('"') {
260
+ "+Inf" | "Inf" | "inf" => f64::INFINITY,
261
+ "-Inf" => f64::NEG_INFINITY,
262
+ other => other.parse().unwrap_or(f64::NEG_INFINITY),
263
+ }
264
+ }
265
+
167
266
  #[cfg(test)]
168
267
  mod test {
169
268
  use magnus::Symbol;
@@ -278,6 +377,44 @@ mod test {
278
377
  assert_eq!(sorted[5].data.json, "zzzzzz");
279
378
  }
280
379
 
380
+ #[test]
381
+ fn test_into_sorted_histogram_buckets() {
382
+ let _cleanup = unsafe { magnus::embed::init() };
383
+ let ruby = magnus::Ruby::get().unwrap();
384
+ crate::init(&ruby).unwrap();
385
+
386
+ // Bucket bounds whose lexicographic order ("+Inf", "10", "100", "1000",
387
+ // "50") differs from their numeric order.
388
+ let les = ["1000", "+Inf", "50", "10", "100"];
389
+
390
+ let mut map = EntryMap::new();
391
+ for le in les {
392
+ let json =
393
+ format!(r#"["family","family_bucket",["le","store"],["{le}","RedisCacheStore"]]"#);
394
+ map.0.insert(
395
+ EntryData { json, pid: None },
396
+ EntryMetadata {
397
+ multiprocess_mode: Symbol::new("all"),
398
+ type_: Symbol::new("histogram"),
399
+ value: 1.0,
400
+ },
401
+ );
402
+ }
403
+
404
+ let sorted = map.into_sorted().unwrap();
405
+
406
+ // `le` is the first label/value pair in the JSON above.
407
+ let order: Vec<String> = sorted
408
+ .iter()
409
+ .map(|e| {
410
+ let m: MetricText = serde_json::from_str(&e.data.json).unwrap();
411
+ m.values[0].get().trim_matches('"').to_string()
412
+ })
413
+ .collect();
414
+
415
+ assert_eq!(order, vec!["10", "50", "100", "1000", "+Inf"]);
416
+ }
417
+
281
418
  #[test]
282
419
  fn test_merge_or_store() {
283
420
  let _cleanup = unsafe { magnus::embed::init() };
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  module Prometheus
2
2
  module Client
3
- VERSION = '1.5.0'.freeze
3
+ VERSION = '1.6.0'.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.5.0
4
+ version: 1.6.0
5
5
  platform: x86_64-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-01-06 00:00:00.000000000 Z
14
+ date: 2026-06-26 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.124
64
+ version: 0.9.128
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.124
71
+ version: 0.9.128
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: fuzzbert
74
74
  requirement: !ruby/object:Gem::Requirement