measurometer 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/lib/measurometer.rb +1 -1
- data/lib/measurometer/version.rb +1 -1
- data/measurometer.gemspec +3 -3
- data/spec/measurometer_spec.rb +2 -0
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bed7af6551956d2c161adbec8ab339f32d9defdcecfd9e6dc3abd8eb0efbfd1e
|
4
|
+
data.tar.gz: 619b62ec3174855e0a8df68c74627603af45aae59bd92b4f8cbac951312b6706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 410bd21ed1c2a692bcd6c85fc933a07152e7370f469585b0814c8bd3311f411a5fb0649f26755ee37191ef85ac3055e2ad0239c639b4a76be2cfa548d28e8b7a
|
7
|
+
data.tar.gz: 41f293885d10f06b50fc0332559920f8b16e5e7e0c2f14100cf2577ccceda316af673a2aaf4f242f3a7d28810b4b975d5a753d25c214a1dc2ade0718267c2f55
|
data/README.md
CHANGED
@@ -48,7 +48,7 @@ Measurometer.drivers << Measurometer::StatsdDriver.new($statsd)
|
|
48
48
|
|
49
49
|
## Installation for libraries
|
50
50
|
|
51
|
-
If you want to supply Measurometer metrics, add this line to your **library's**
|
51
|
+
If you want to supply Measurometer metrics, add this line to your **library's** `.gemspec`:
|
52
52
|
|
53
53
|
```ruby
|
54
54
|
s.add_dependency 'measurometer', '~> 1'
|
data/lib/measurometer.rb
CHANGED
@@ -71,7 +71,7 @@ module Measurometer
|
|
71
71
|
# @param counter_path[String] under which path to push the metric
|
72
72
|
# @param by[Integer] the counter increment to apply
|
73
73
|
# @return nil
|
74
|
-
def increment_counter(counter_path, by)
|
74
|
+
def increment_counter(counter_path, by = 1)
|
75
75
|
@drivers.each { |d| d.increment_counter(counter_path, by) }
|
76
76
|
nil
|
77
77
|
end
|
data/lib/measurometer/version.rb
CHANGED
data/measurometer.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_development_dependency 'bundler', '~> 1
|
24
|
-
spec.add_development_dependency 'rake', '~> 10
|
25
|
-
spec.add_development_dependency 'rspec', '~> 3
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3'
|
26
26
|
spec.add_development_dependency 'wetransfer_style', '0.5.0'
|
27
27
|
end
|
data/spec/measurometer_spec.rb
CHANGED
@@ -88,6 +88,7 @@ RSpec.describe Measurometer do
|
|
88
88
|
sleep(rand / 4)
|
89
89
|
Measurometer.instrument('something_amazing.subtask') do
|
90
90
|
sleep(rand / 9)
|
91
|
+
Measurometer.increment_counter('something_amazing.conflagrations_triggered')
|
91
92
|
Measurometer.increment_counter('something_amazing.subtasks_performed', 1)
|
92
93
|
end
|
93
94
|
Measurometer.instrument('something_amazing.another_subtask') do
|
@@ -102,6 +103,7 @@ RSpec.describe Measurometer do
|
|
102
103
|
Measurometer.drivers.delete(instrumenter)
|
103
104
|
|
104
105
|
expect(instrumenter.counters).to include_counter_or_measurement_named('something_amazing.subtasks_performed')
|
106
|
+
expect(instrumenter.counters).to include_counter_or_measurement_named('something_amazing.conflagrations_triggered')
|
105
107
|
expect(instrumenter.distributions).to include_counter_or_measurement_named('something_amazing.another_subtask.sleep_durations')
|
106
108
|
expect(instrumenter.timings).to include_counter_or_measurement_named('something_amazing.subtask')
|
107
109
|
expect(instrumenter.timings).to include_counter_or_measurement_named('something_amazing.another_subtask')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: measurometer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '10
|
33
|
+
version: '10'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '10
|
40
|
+
version: '10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3
|
47
|
+
version: '3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3
|
54
|
+
version: '3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: wetransfer_style
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.7.6
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Minimum viable API for instrumentation in libraries
|