prometheus-client-mmap 1.2.1-aarch64-linux-musl
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.tool-versions +1 -0
- data/README.md +281 -0
- data/ext/fast_mmaped_file_rs/Cargo.toml +35 -0
- data/ext/fast_mmaped_file_rs/README.md +52 -0
- data/ext/fast_mmaped_file_rs/build.rs +5 -0
- data/ext/fast_mmaped_file_rs/extconf.rb +28 -0
- data/ext/fast_mmaped_file_rs/src/error.rs +174 -0
- data/ext/fast_mmaped_file_rs/src/file_entry.rs +784 -0
- data/ext/fast_mmaped_file_rs/src/file_info.rs +240 -0
- data/ext/fast_mmaped_file_rs/src/lib.rs +78 -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/inner.rs +704 -0
- data/ext/fast_mmaped_file_rs/src/mmap.rs +891 -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/3.1/fast_mmaped_file_rs.so +0 -0
- data/lib/3.2/fast_mmaped_file_rs.so +0 -0
- data/lib/3.3/fast_mmaped_file_rs.so +0 -0
- data/lib/3.4/fast_mmaped_file_rs.so +0 -0
- data/lib/prometheus/client/configuration.rb +23 -0
- data/lib/prometheus/client/counter.rb +27 -0
- data/lib/prometheus/client/formats/text.rb +85 -0
- data/lib/prometheus/client/gauge.rb +40 -0
- data/lib/prometheus/client/helper/entry_parser.rb +132 -0
- data/lib/prometheus/client/helper/file_locker.rb +50 -0
- data/lib/prometheus/client/helper/json_parser.rb +23 -0
- data/lib/prometheus/client/helper/metrics_processing.rb +45 -0
- data/lib/prometheus/client/helper/metrics_representation.rb +51 -0
- data/lib/prometheus/client/helper/mmaped_file.rb +64 -0
- data/lib/prometheus/client/helper/plain_file.rb +29 -0
- data/lib/prometheus/client/histogram.rb +80 -0
- data/lib/prometheus/client/label_set_validator.rb +85 -0
- data/lib/prometheus/client/metric.rb +80 -0
- data/lib/prometheus/client/mmaped_dict.rb +79 -0
- data/lib/prometheus/client/mmaped_value.rb +154 -0
- data/lib/prometheus/client/page_size.rb +17 -0
- data/lib/prometheus/client/push.rb +203 -0
- data/lib/prometheus/client/rack/collector.rb +88 -0
- data/lib/prometheus/client/rack/exporter.rb +96 -0
- data/lib/prometheus/client/registry.rb +65 -0
- data/lib/prometheus/client/simple_value.rb +31 -0
- data/lib/prometheus/client/summary.rb +69 -0
- data/lib/prometheus/client/support/puma.rb +44 -0
- data/lib/prometheus/client/support/unicorn.rb +35 -0
- data/lib/prometheus/client/uses_value_type.rb +20 -0
- data/lib/prometheus/client/version.rb +5 -0
- data/lib/prometheus/client.rb +58 -0
- data/lib/prometheus.rb +3 -0
- metadata +249 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'prometheus/client/registry'
|
2
|
+
require 'prometheus/client/configuration'
|
3
|
+
require 'prometheus/client/mmaped_value'
|
4
|
+
|
5
|
+
module Prometheus
|
6
|
+
# Client is a ruby implementation for a Prometheus compatible client.
|
7
|
+
module Client
|
8
|
+
class << self
|
9
|
+
attr_writer :configuration
|
10
|
+
|
11
|
+
def configuration
|
12
|
+
@configuration ||= Configuration.new
|
13
|
+
end
|
14
|
+
|
15
|
+
def configure
|
16
|
+
yield(configuration)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Returns a default registry object
|
20
|
+
def registry
|
21
|
+
@registry ||= Registry.new
|
22
|
+
end
|
23
|
+
|
24
|
+
def logger
|
25
|
+
configuration.logger
|
26
|
+
end
|
27
|
+
|
28
|
+
def pid
|
29
|
+
configuration.pid_provider.call
|
30
|
+
end
|
31
|
+
|
32
|
+
# Resets the registry and reinitializes all metrics files.
|
33
|
+
# Use case: clean up everything in specs `before` block,
|
34
|
+
# to prevent leaking the state between specs which are updating metrics.
|
35
|
+
def reset!
|
36
|
+
@registry = nil
|
37
|
+
::Prometheus::Client::MmapedValue.reset_and_reinitialize
|
38
|
+
end
|
39
|
+
|
40
|
+
def cleanup!
|
41
|
+
Dir.glob("#{configuration.multiprocess_files_dir}/*.db").each { |f| File.unlink(f) if File.exist?(f) }
|
42
|
+
end
|
43
|
+
|
44
|
+
# With `force: false`: reinitializes metric files only for processes with the changed PID.
|
45
|
+
# With `force: true`: reinitializes all metrics files.
|
46
|
+
# Always keeps the registry.
|
47
|
+
# Use case (`force: false`): pick up new metric files on each worker start,
|
48
|
+
# without resetting already registered files for the master or previously initialized workers.
|
49
|
+
def reinitialize_on_pid_change(force: false)
|
50
|
+
if force
|
51
|
+
::Prometheus::Client::MmapedValue.reset_and_reinitialize
|
52
|
+
else
|
53
|
+
::Prometheus::Client::MmapedValue.reinitialize_on_pid_change
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/prometheus.rb
ADDED
metadata
ADDED
@@ -0,0 +1,249 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: prometheus-client-mmap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.1
|
5
|
+
platform: aarch64-linux-musl
|
6
|
+
authors:
|
7
|
+
- Tobias Schmidt
|
8
|
+
- Paweł Chojnacki
|
9
|
+
- Stan Hu
|
10
|
+
- Will Chandler
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2024-12-29 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rb_sys
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.9.86
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.9.86
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: base64
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: bigdecimal
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
type: :runtime
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: fuzzbert
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - "~>"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '1.0'
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 1.0.4
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '1.0'
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.0.4
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: gem_publisher
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - "~>"
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '1'
|
85
|
+
type: :development
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '1'
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: pry
|
94
|
+
requirement: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 0.12.2
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 0.12.2
|
106
|
+
- !ruby/object:Gem::Dependency
|
107
|
+
name: rake-compiler
|
108
|
+
requirement: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 1.2.7
|
113
|
+
type: :development
|
114
|
+
prerelease: false
|
115
|
+
version_requirements: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - "~>"
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 1.2.7
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
name: rake-compiler-dock
|
122
|
+
requirement: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - "~>"
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 1.7.0
|
127
|
+
type: :development
|
128
|
+
prerelease: false
|
129
|
+
version_requirements: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - "~>"
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 1.7.0
|
134
|
+
- !ruby/object:Gem::Dependency
|
135
|
+
name: rspec
|
136
|
+
requirement: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - "~>"
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '3.2'
|
141
|
+
type: :development
|
142
|
+
prerelease: false
|
143
|
+
version_requirements: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '3.2'
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
name: ruby-prof
|
150
|
+
requirement: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - "~>"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '1.7'
|
155
|
+
type: :development
|
156
|
+
prerelease: false
|
157
|
+
version_requirements: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - "~>"
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '1.7'
|
162
|
+
description:
|
163
|
+
email:
|
164
|
+
- ts@soundcloud.com
|
165
|
+
- pawel@gitlab.com
|
166
|
+
- stanhu@gmail.com
|
167
|
+
- wchandler@gitlab.com
|
168
|
+
executables: []
|
169
|
+
extensions: []
|
170
|
+
extra_rdoc_files: []
|
171
|
+
files:
|
172
|
+
- ".tool-versions"
|
173
|
+
- README.md
|
174
|
+
- ext/fast_mmaped_file_rs/Cargo.toml
|
175
|
+
- ext/fast_mmaped_file_rs/README.md
|
176
|
+
- ext/fast_mmaped_file_rs/build.rs
|
177
|
+
- ext/fast_mmaped_file_rs/extconf.rb
|
178
|
+
- ext/fast_mmaped_file_rs/src/error.rs
|
179
|
+
- ext/fast_mmaped_file_rs/src/file_entry.rs
|
180
|
+
- ext/fast_mmaped_file_rs/src/file_info.rs
|
181
|
+
- ext/fast_mmaped_file_rs/src/lib.rs
|
182
|
+
- ext/fast_mmaped_file_rs/src/macros.rs
|
183
|
+
- ext/fast_mmaped_file_rs/src/map.rs
|
184
|
+
- ext/fast_mmaped_file_rs/src/mmap.rs
|
185
|
+
- ext/fast_mmaped_file_rs/src/mmap/inner.rs
|
186
|
+
- ext/fast_mmaped_file_rs/src/raw_entry.rs
|
187
|
+
- ext/fast_mmaped_file_rs/src/testhelper.rs
|
188
|
+
- ext/fast_mmaped_file_rs/src/util.rs
|
189
|
+
- lib/3.1/fast_mmaped_file_rs.so
|
190
|
+
- lib/3.2/fast_mmaped_file_rs.so
|
191
|
+
- lib/3.3/fast_mmaped_file_rs.so
|
192
|
+
- lib/3.4/fast_mmaped_file_rs.so
|
193
|
+
- lib/prometheus.rb
|
194
|
+
- lib/prometheus/client.rb
|
195
|
+
- lib/prometheus/client/configuration.rb
|
196
|
+
- lib/prometheus/client/counter.rb
|
197
|
+
- lib/prometheus/client/formats/text.rb
|
198
|
+
- lib/prometheus/client/gauge.rb
|
199
|
+
- lib/prometheus/client/helper/entry_parser.rb
|
200
|
+
- lib/prometheus/client/helper/file_locker.rb
|
201
|
+
- lib/prometheus/client/helper/json_parser.rb
|
202
|
+
- lib/prometheus/client/helper/metrics_processing.rb
|
203
|
+
- lib/prometheus/client/helper/metrics_representation.rb
|
204
|
+
- lib/prometheus/client/helper/mmaped_file.rb
|
205
|
+
- lib/prometheus/client/helper/plain_file.rb
|
206
|
+
- lib/prometheus/client/histogram.rb
|
207
|
+
- lib/prometheus/client/label_set_validator.rb
|
208
|
+
- lib/prometheus/client/metric.rb
|
209
|
+
- lib/prometheus/client/mmaped_dict.rb
|
210
|
+
- lib/prometheus/client/mmaped_value.rb
|
211
|
+
- lib/prometheus/client/page_size.rb
|
212
|
+
- lib/prometheus/client/push.rb
|
213
|
+
- lib/prometheus/client/rack/collector.rb
|
214
|
+
- lib/prometheus/client/rack/exporter.rb
|
215
|
+
- lib/prometheus/client/registry.rb
|
216
|
+
- lib/prometheus/client/simple_value.rb
|
217
|
+
- lib/prometheus/client/summary.rb
|
218
|
+
- lib/prometheus/client/support/puma.rb
|
219
|
+
- lib/prometheus/client/support/unicorn.rb
|
220
|
+
- lib/prometheus/client/uses_value_type.rb
|
221
|
+
- lib/prometheus/client/version.rb
|
222
|
+
homepage: https://gitlab.com/gitlab-org/prometheus-client-mmap
|
223
|
+
licenses:
|
224
|
+
- Apache-2.0
|
225
|
+
metadata: {}
|
226
|
+
post_install_message:
|
227
|
+
rdoc_options: []
|
228
|
+
require_paths:
|
229
|
+
- lib
|
230
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
231
|
+
requirements:
|
232
|
+
- - ">="
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: '3.1'
|
235
|
+
- - "<"
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: 3.5.dev
|
238
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
|
+
requirements:
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: 3.3.22
|
243
|
+
requirements: []
|
244
|
+
rubygems_version: 3.5.23
|
245
|
+
signing_key:
|
246
|
+
specification_version: 4
|
247
|
+
summary: A suite of instrumentation metric primitives that can be exposed through
|
248
|
+
a web services interface.
|
249
|
+
test_files: []
|