mettric 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +4 -0
- data/lib/mettric/mettric.rb +3 -2
- data/lib/mettric/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf29224def9171b196e8989bcd132f881267b6d8
|
4
|
+
data.tar.gz: 2d83a52017f9ac892171c3769cc6efbec985bdc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e260be235860e9cc427db18a92035a1866b260e7a5424b1115557d507c1a685426cf4a71e53ff6e51defb2fdcbb3c6a9d22f98683e2438409c7d1a45801e81d
|
7
|
+
data.tar.gz: da2ade0317bc8db6c1c156774ad4405b54ad9dc2d671f274201afd636322a2bfe79c7b9488afc6c689ffe1db366b315f0b9723600d328b497f6fc2041753e4f0
|
data/CHANGELOG.markdown
CHANGED
data/lib/mettric/mettric.rb
CHANGED
@@ -45,10 +45,11 @@ class Mettric
|
|
45
45
|
# To track durations
|
46
46
|
def self.time(payload)
|
47
47
|
exception = nil
|
48
|
+
result = nil
|
48
49
|
state = 'success'
|
49
50
|
start = Time.now
|
50
51
|
begin
|
51
|
-
yield
|
52
|
+
result = yield
|
52
53
|
rescue => e
|
53
54
|
exception = e
|
54
55
|
state = 'failure'
|
@@ -57,7 +58,7 @@ class Mettric
|
|
57
58
|
payload[:description] = [payload[:description], "(ms)"].compact.join(' ')
|
58
59
|
payload[:tags] ||= []
|
59
60
|
payload[:tags] << :timing
|
60
|
-
|
61
|
+
track(payload)
|
61
62
|
raise exception if exception
|
62
63
|
result
|
63
64
|
end
|
data/lib/mettric/version.rb
CHANGED