prometheus-client-mmap 0.7.0.beta20 → 0.7.0.beta21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prometheus/client/mmaped_dict.rb +6 -6
- data/lib/prometheus/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05c2d171bfeeb4f30eadedd0ef75e06b39d66785
|
4
|
+
data.tar.gz: caa03d42c1075a8944b341390f2f62c01a1d6beb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43c827be0d6f745c2ffa34e79163a28ea05c14e735d07c6c8863190e45b8d34f33914fc9fe8340460aa6eadef645d8c7bf8aaf90b9d06e1f16a74550fdf4b40a
|
7
|
+
data.tar.gz: c4ab77d90e3f094f612a1c4feec3a4f5bfa2f792119db96f7304fdf063870f541a17c581299d5814ca57a050064107d5ff43a3df8ee771aed3c0826bc37c4b68
|
@@ -43,19 +43,19 @@ module Prometheus
|
|
43
43
|
def read_value(key)
|
44
44
|
@mutex.synchronize do
|
45
45
|
init_value(key) unless @positions.key?(key)
|
46
|
+
|
47
|
+
pos = @positions[key]
|
48
|
+
@m[pos..pos + 7].unpack('d')[0]
|
46
49
|
end
|
47
|
-
pos = @positions[key]
|
48
|
-
# We assume that reading from an 8 byte aligned value is atomic.
|
49
|
-
@m[pos..pos + 7].unpack('d')[0]
|
50
50
|
end
|
51
51
|
|
52
52
|
def write_value(key, value)
|
53
53
|
@mutex.synchronize do
|
54
54
|
init_value(key) unless @positions.key?(key)
|
55
|
+
|
56
|
+
pos = @positions[key]
|
57
|
+
@m[pos..pos + 7] = [value].pack('d')
|
55
58
|
end
|
56
|
-
pos = @positions[key]
|
57
|
-
# We assume that writing to an 8 byte aligned value is atomic.
|
58
|
-
@m[pos..pos + 7] = [value].pack('d')
|
59
59
|
end
|
60
60
|
|
61
61
|
def path
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prometheus-client-mmap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.0.
|
4
|
+
version: 0.7.0.beta21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schmidt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mmap2
|