mettric 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/mettric/mettric.rb +2 -1
- data/lib/mettric/scnr.rb +4 -0
- data/lib/mettric/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36f3167f4ea535652f4ec429700a907f32a8a9d7
|
4
|
+
data.tar.gz: cfe675b2ee7ca540c4c0c9815e020bb85d59a00c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb4a1f48c0ea149ed2314a215ed3b07732cf667b773a008d1b38f88a88765e080df16a9adcfb95b2e34e9a9582328fd67074dccc98eccbcd6c29e7e933cb791a
|
7
|
+
data.tar.gz: 352489c27165c4b1780ab36ad3e6f65b2dc0ff7b6a7880ff43c5da6232d088c349319c63a7ef45e44ae177cf27cfbf3885938bfd25ca714e12c9dc9b10354bde
|
data/README.md
CHANGED
@@ -20,3 +20,12 @@ Mettric.config = {
|
|
20
20
|
```ruby
|
21
21
|
🌡 service: 'Rails req/s', metric: 400, state: 'normal'
|
22
22
|
```
|
23
|
+
|
24
|
+
## Time things
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
# This will track the duration in milliseconds as the `metric` value
|
28
|
+
⏱ (service: 'Duration of sleeping 1 sec') do
|
29
|
+
sleep 1
|
30
|
+
end
|
31
|
+
```
|
data/lib/mettric/mettric.rb
CHANGED
data/lib/mettric/scnr.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# SCNR
|
2
2
|
def 🌡(payload)
|
3
3
|
Mettric.track(payload)
|
4
|
+
rescue Mettric::CouldNotStartWorkerThread
|
5
|
+
puts "***WARNING*** Mettric::CouldNotStartWorkerThread raised"
|
4
6
|
end
|
5
7
|
|
6
8
|
def ⏱(payload, &block)
|
7
9
|
Mettric.time(payload) do
|
8
10
|
block.call
|
9
11
|
end
|
12
|
+
rescue Mettric::CouldNotStartWorkerThread
|
13
|
+
puts "***WARNING*** Mettric::CouldNotStartWorkerThread raised"
|
10
14
|
end
|
11
15
|
|
data/lib/mettric/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mettric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jannis Hermanns
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|