pulse_meter_core 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.rbenv-version +1 -1
- data/.travis.yml +2 -0
- data/pulse_meter_core.gemspec +1 -1
- data/spec/pulse_meter/command_aggregator/async_spec.rb +14 -14
- data/spec/pulse_meter/command_aggregator/sync_spec.rb +5 -5
- data/spec/pulse_meter/command_aggregator/udp_spec.rb +8 -8
- data/spec/pulse_meter/mixins/dumper_spec.rb +27 -27
- data/spec/pulse_meter/mixins/utils_spec.rb +64 -64
- data/spec/pulse_meter/observer/extended_spec.rb +20 -20
- data/spec/pulse_meter/observer_spec.rb +26 -26
- data/spec/pulse_meter/sensor/base_spec.rb +25 -25
- data/spec/pulse_meter/sensor/configuration_spec.rb +21 -21
- data/spec/pulse_meter/sensor/counter_spec.rb +12 -12
- data/spec/pulse_meter/sensor/hashed_counter_spec.rb +9 -9
- data/spec/pulse_meter/sensor/hashed_indicator_spec.rb +10 -10
- data/spec/pulse_meter/sensor/indicator_spec.rb +9 -9
- data/spec/pulse_meter/sensor/multi_spec.rb +13 -13
- data/spec/pulse_meter/sensor/timeline_spec.rb +12 -12
- data/spec/pulse_meter/sensor/timelined/multi_percentile_spec.rb +2 -2
- data/spec/pulse_meter/sensor/timelined/percentile_spec.rb +1 -1
- data/spec/pulse_meter/sensor/uniq_counter_spec.rb +5 -5
- data/spec/pulse_meter/udp_server_spec.rb +9 -9
- data/spec/pulse_meter_spec.rb +21 -21
- data/spec/shared_examples/timeline_sensor.rb +88 -88
- data/spec/shared_examples/timelined_subclass.rb +2 -2
- data/spec/spec_helper.rb +2 -0
- data/spec/support/matchers.rb +2 -2
- metadata +34 -34
@@ -8,7 +8,7 @@ shared_examples_for "timelined subclass" do |events, result, extra_options|
|
|
8
8
|
let(:sensor){ described_class.new(name, init_values) }
|
9
9
|
let(:epsilon) {1}
|
10
10
|
|
11
|
-
it "
|
11
|
+
it "calculates summarized value #{result.inspect} of #{events.inspect}" do
|
12
12
|
interval_id = 0
|
13
13
|
start_of_interval = Time.at(interval_id)
|
14
14
|
Timecop.freeze(start_of_interval) do
|
@@ -16,7 +16,7 @@ shared_examples_for "timelined subclass" do |events, result, extra_options|
|
|
16
16
|
end
|
17
17
|
Timecop.freeze(start_of_interval + interval) do
|
18
18
|
data = sensor.timeline(interval + epsilon).first
|
19
|
-
data.value.
|
19
|
+
expect(data.value).to be_generally_equal(sensor.deflate_safe(result))
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/matchers.rb
CHANGED
@@ -18,11 +18,11 @@ module Matchers
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
21
|
+
def failure_message
|
22
22
|
"expected #{@actual.inspect} to be generally equal to #{@expected.inspect}"
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
25
|
+
def failure_message_when_negated
|
26
26
|
"expected #{@actual.inspect} not to be generally equal to #{@expected.inspect}"
|
27
27
|
end
|
28
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pulse_meter_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Averyanov
|
@@ -9,174 +9,174 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-06-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: redis
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: tzinfo
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: aquarium
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: hashie
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: mock_redis
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rake
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- -
|
109
|
+
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: redcarpet
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: rspec
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: simplecov
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- -
|
144
|
+
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- -
|
151
|
+
- - ">="
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: timecop
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- -
|
158
|
+
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
|
-
- -
|
165
|
+
- - ">="
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: '0'
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: yard
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
|
-
- -
|
172
|
+
- - ">="
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
type: :development
|
176
176
|
prerelease: false
|
177
177
|
version_requirements: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- -
|
179
|
+
- - ">="
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
description: Lightweight metrics processor
|
@@ -187,11 +187,11 @@ executables: []
|
|
187
187
|
extensions: []
|
188
188
|
extra_rdoc_files: []
|
189
189
|
files:
|
190
|
-
- .gitignore
|
191
|
-
- .rbenv-version
|
192
|
-
- .rspec
|
193
|
-
- .rvmrc
|
194
|
-
- .travis.yml
|
190
|
+
- ".gitignore"
|
191
|
+
- ".rbenv-version"
|
192
|
+
- ".rspec"
|
193
|
+
- ".rvmrc"
|
194
|
+
- ".travis.yml"
|
195
195
|
- Gemfile
|
196
196
|
- LICENSE
|
197
197
|
- README.md
|
@@ -277,17 +277,17 @@ require_paths:
|
|
277
277
|
- lib
|
278
278
|
required_ruby_version: !ruby/object:Gem::Requirement
|
279
279
|
requirements:
|
280
|
-
- -
|
280
|
+
- - ">="
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: 1.9.2
|
283
283
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
284
284
|
requirements:
|
285
|
-
- -
|
285
|
+
- - ">="
|
286
286
|
- !ruby/object:Gem::Version
|
287
287
|
version: '0'
|
288
288
|
requirements: []
|
289
289
|
rubyforge_project:
|
290
|
-
rubygems_version: 2.4.
|
290
|
+
rubygems_version: 2.4.5
|
291
291
|
signing_key:
|
292
292
|
specification_version: 4
|
293
293
|
summary: Lightweight Redis-based metrics aggregator and processor with simple CLI
|