prometheus-client-mmap 0.7.0.beta1 → 0.7.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10577a7fe85f4340b412160d874b2249fb9af895
4
- data.tar.gz: c04685b407830ad5d30ed1b2f74980078beca53c
3
+ metadata.gz: 82b0822293d2669014f8790678dc824da3281383
4
+ data.tar.gz: 7b9d4e382530810a0db3ea9074afd23cd806d0d2
5
5
  SHA512:
6
- metadata.gz: 114932d1e37c16c689b1dbdf9e9c22c4c0b17e7d3fe554418b37ca2795fc4553e4f821457791d75896fc07832a2a8057d103b93cc23dab23740d1ec1bd20a946
7
- data.tar.gz: ba68e2b1367ee698ed3a4895537be822557d12c90402ad3f46bfad847f334f5b511d25eba8808b89ecd994c3bcfce95a246eaf97b46c80dcd1e7cbd8563d9f0b
6
+ metadata.gz: e100f0a72eadec532716e375bca0c7899484cb62f7fca463730e7cdcdf09fb90517de079642e66dbceef8b0e1013d845b165a5c5a9a0d5f91897ee81ac78f8e5
7
+ data.tar.gz: 36379031c3797f6a88e2a2376e4341de1f0dbc057322c25b8881ec4679117bcd5b56a7aef010ea18e727d7e1fb42d04f43b946c77af543f25615397d8e33c08d
@@ -62,10 +62,15 @@ module Prometheus
62
62
  end
63
63
 
64
64
  def respond_with(format)
65
+ if ENV.has_key?('prometheus_multiproc_dir')
66
+ response = format.marshal_multiprocess
67
+ else
68
+ response = format.marshal(@registry)
69
+ end
65
70
  [
66
71
  200,
67
72
  { 'Content-Type' => format::CONTENT_TYPE },
68
- [format.marshal(@registry)],
73
+ [response],
69
74
  ]
70
75
  end
71
76
 
@@ -25,9 +25,6 @@ module Prometheus
25
25
  end
26
26
 
27
27
  def initialize(name, docstring, base_labels = {}, multiprocess_mode)
28
- if ENV['prometheus_multiproc_dir']
29
- raise ArgumentError, "Summary metric type does not have multiprocess support"
30
- end
31
28
  super(name, docstring, base_labels)
32
29
  end
33
30
 
@@ -56,7 +53,7 @@ module Prometheus
56
53
  def values
57
54
  synchronize do
58
55
  @values.each_with_object({}) do |(labels, value), memo|
59
- memo[labels] = Value.new(value)
56
+ memo[labels] = value
60
57
  end
61
58
  end
62
59
  end
@@ -64,7 +61,7 @@ module Prometheus
64
61
  private
65
62
 
66
63
  def default(labels)
67
- Quantile::Estimator.new
64
+ Value.new(type, @name, labels, Quantile::Estimator.new)
68
65
  end
69
66
  end
70
67
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Prometheus
4
4
  module Client
5
- VERSION = '0.7.0.beta1'
5
+ VERSION = '0.7.0.beta2'
6
6
  end
7
7
  end
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.beta1
4
+ version: 0.7.0.beta2
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-04-24 00:00:00.000000000 Z
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: quantile