prometheus-client-mmap 0.19.1 → 0.20.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/ext/fast_mmaped_file/extconf.rb +1 -1
- data/ext/fast_mmaped_file_rs/.cargo/config.toml +23 -0
- data/ext/fast_mmaped_file_rs/Cargo.lock +790 -0
- data/ext/fast_mmaped_file_rs/Cargo.toml +30 -0
- data/ext/fast_mmaped_file_rs/README.md +52 -0
- data/ext/fast_mmaped_file_rs/extconf.rb +30 -0
- data/ext/fast_mmaped_file_rs/src/error.rs +174 -0
- data/ext/fast_mmaped_file_rs/src/file_entry.rs +579 -0
- data/ext/fast_mmaped_file_rs/src/file_info.rs +190 -0
- data/ext/fast_mmaped_file_rs/src/lib.rs +79 -0
- data/ext/fast_mmaped_file_rs/src/macros.rs +14 -0
- data/ext/fast_mmaped_file_rs/src/map.rs +492 -0
- data/ext/fast_mmaped_file_rs/src/mmap.rs +151 -0
- data/ext/fast_mmaped_file_rs/src/parser.rs +346 -0
- data/ext/fast_mmaped_file_rs/src/raw_entry.rs +473 -0
- data/ext/fast_mmaped_file_rs/src/testhelper.rs +222 -0
- data/ext/fast_mmaped_file_rs/src/util.rs +121 -0
- data/lib/prometheus/client/configuration.rb +2 -1
- data/lib/prometheus/client/formats/text.rb +26 -2
- data/lib/prometheus/client/page_size.rb +17 -0
- data/lib/prometheus/client/version.rb +1 -1
- data/vendor/c/hashmap/.gitignore +52 -0
- data/vendor/c/jsmn/.travis.yml +4 -0
- metadata +37 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a044be30f61b4d49820eb47e00c524ba90c3bb15ad8f6ddb97c0106eecda2839
|
4
|
+
data.tar.gz: aa953907ebd58fe257cb0f894e8d997746c61f38e1b45e3500e288fc5a3c54e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c499ccd0dc2442f9a5ffd0cab890a1f462a0f086bf818cb2af61c9533170fe6f0d6c5a84124053838c4be0a180ec8be29c114de45785c6066841fe88282628d0
|
7
|
+
data.tar.gz: 4bac46af2fff3c5d2332199c69ba78e625015bf5820089e295462a6d22d4f7ecab023ae138628f9e582c4738e97a4d77d939082993625a3d5a9a5ff9a448feb8
|
data/README.md
CHANGED
@@ -34,6 +34,20 @@ http_requests = prometheus.counter(:http_requests, 'A counter of HTTP requests m
|
|
34
34
|
http_requests.increment
|
35
35
|
```
|
36
36
|
|
37
|
+
## Rust extension (experimental)
|
38
|
+
|
39
|
+
In an effort to improve maintainability, there is now an optional Rust
|
40
|
+
implementation that reads the metric files and outputs the multiprocess
|
41
|
+
metrics to text. If `rustc` is available, then the Rust extension will
|
42
|
+
be built automatically. The `use_rust` keyword argument can be used:
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
puts Prometheus::Client::Formats::Text.marshal_multiprocess(use_rust: true)
|
46
|
+
```
|
47
|
+
|
48
|
+
Note that this parameter will likely be deprecated and removed once the Rust
|
49
|
+
extension becomes the default mode.
|
50
|
+
|
37
51
|
### Rack middleware
|
38
52
|
|
39
53
|
There are two [Rack][2] middlewares available, one to expose a metrics HTTP
|
@@ -0,0 +1,23 @@
|
|
1
|
+
[target.aarch64-apple-darwin]
|
2
|
+
# Without this flag, when linking static libruby, the linker removes symbols
|
3
|
+
# (such as `_rb_ext_ractor_safe`) which it thinks are dead code... but they are
|
4
|
+
# not, and they need to be included for the `embed` feature to work with static
|
5
|
+
# Ruby.
|
6
|
+
rustflags = [
|
7
|
+
"-C", "link-dead-code=on",
|
8
|
+
"-C", "link-arg=-undefined",
|
9
|
+
"-C", "link-arg=dynamic_lookup",
|
10
|
+
]
|
11
|
+
|
12
|
+
[target.x86_64-apple-darwin]
|
13
|
+
rustflags = [
|
14
|
+
"-C", "link-dead-code=on",
|
15
|
+
"-C", "link-arg=-undefined",
|
16
|
+
"-C", "link-arg=dynamic_lookup",
|
17
|
+
]
|
18
|
+
|
19
|
+
[target.aarch64-unknown-linux-gnu]
|
20
|
+
rustflags = [ "-C", "link-dead-code=on" ]
|
21
|
+
|
22
|
+
[target.x86_64-unknown-linux-gnu]
|
23
|
+
rustflags = [ "-C", "link-dead-code=on" ]
|