leafy-metrics 0.4.0-java → 0.5.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/leafy/metrics/version.rb +1 -1
- data/spec/jvm_metrics_spec.rb +1 -5
- data/spec/registry_spec.rb +17 -0
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc7199f0a916e6bbd6f9c83e6db586d44ef10292
|
4
|
+
data.tar.gz: 691f3e9f8314da6285cb4be617b8a696df62d79f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7b8fcf83804eb702902deb42a47373dc10ca3de765e5541da590c06939b9a64a6168ff9ed08b25e466419f4fc26d0993aebdc87f644eced2558f72871c989e0
|
7
|
+
data.tar.gz: 29951bf246702948f03d2782e4c2f149435f2e56689f799488706e63dd5769e1b4aa2c2f209d1013d9ad9a74b600e7cec64608ad40969034c78923f0cf1f12a9
|
data/spec/jvm_metrics_spec.rb
CHANGED
@@ -22,15 +22,11 @@ describe Leafy::Metrics::JvmMetrics do
|
|
22
22
|
total = registry.metrics.gauges['test.count'].value
|
23
23
|
|
24
24
|
t = Thread.new do
|
25
|
-
|
26
|
-
while( Thread.current[:running] ) do
|
27
|
-
sleep 0.1
|
28
|
-
end
|
25
|
+
sleep 0.1
|
29
26
|
end
|
30
27
|
|
31
28
|
expect( registry.metrics.gauges['test.count'].value ).to eq total + 1
|
32
29
|
|
33
|
-
t[:running] = false
|
34
30
|
sleep 0.1
|
35
31
|
t.join
|
36
32
|
|
data/spec/registry_spec.rb
CHANGED
@@ -102,5 +102,22 @@ describe Leafy::Metrics::Registry do
|
|
102
102
|
|
103
103
|
subject.remove('me')
|
104
104
|
end
|
105
|
+
|
106
|
+
it 'can messure duration by passing in block' do
|
107
|
+
@obj = subject.register_timer('me')
|
108
|
+
expect(@obj.timer.mean_rate).to eq 0.0
|
109
|
+
|
110
|
+
def measure_me( &block )
|
111
|
+
@obj.time &block
|
112
|
+
end
|
113
|
+
|
114
|
+
measure_me do
|
115
|
+
sleep 0.1
|
116
|
+
end
|
117
|
+
|
118
|
+
expect(@obj.timer.mean_rate).to be > 0.0
|
119
|
+
|
120
|
+
subject.remove('me')
|
121
|
+
end
|
105
122
|
end
|
106
123
|
end
|
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leafy-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- christian meier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: jar-dependencies
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.8
|
14
20
|
requirement: !ruby/object:Gem::Requirement
|
15
21
|
requirements:
|
16
22
|
- - ~>
|
17
23
|
- !ruby/object:Gem::Version
|
18
24
|
version: 0.1.8
|
19
|
-
name: jar-dependencies
|
20
25
|
prerelease: false
|
21
26
|
type: :runtime
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
22
29
|
version_requirements: !ruby/object:Gem::Requirement
|
23
30
|
requirements:
|
24
31
|
- - ~>
|
25
32
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version: '3.1'
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
29
35
|
requirements:
|
30
36
|
- - ~>
|
31
37
|
- !ruby/object:Gem::Version
|
32
38
|
version: '3.1'
|
33
|
-
name: rspec
|
34
39
|
prerelease: false
|
35
40
|
type: :development
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: yard
|
36
43
|
version_requirements: !ruby/object:Gem::Requirement
|
37
44
|
requirements:
|
38
45
|
- - ~>
|
39
46
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version: 0.8.7
|
42
48
|
requirement: !ruby/object:Gem::Requirement
|
43
49
|
requirements:
|
44
50
|
- - ~>
|
45
51
|
- !ruby/object:Gem::Version
|
46
52
|
version: 0.8.7
|
47
|
-
name: yard
|
48
53
|
prerelease: false
|
49
54
|
type: :development
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
50
57
|
version_requirements: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
- !ruby/object:Gem::Dependency
|
61
|
+
version: '10.2'
|
56
62
|
requirement: !ruby/object:Gem::Requirement
|
57
63
|
requirements:
|
58
64
|
- - ~>
|
59
65
|
- !ruby/object:Gem::Version
|
60
66
|
version: '10.2'
|
61
|
-
name: rake
|
62
67
|
prerelease: false
|
63
68
|
type: :development
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ~>
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '10.2'
|
69
69
|
description: 'provides an API to register metrics like meters, timers, gauge, counter
|
70
70
|
using dropwizard-metrics. it also allows to setup reporters: console-reporter, csv-reporter
|
71
71
|
and graphite-reporter'
|