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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f4306c87d4531a15b74ffcf276c5b6188baaf1c
4
- data.tar.gz: 18ddb34da3da8c067bf10c9bd6f80735827084a9
3
+ metadata.gz: 36f3167f4ea535652f4ec429700a907f32a8a9d7
4
+ data.tar.gz: cfe675b2ee7ca540c4c0c9815e020bb85d59a00c
5
5
  SHA512:
6
- metadata.gz: d2822b077481795f543dd8ece17d7b714f0c240482b15500c03a7f6c5b7ac5b13f8394d4fd03ca2c5f7060792131742ffa3851cb8de0d58ba09dd80cf5c8c2aa
7
- data.tar.gz: ca2433486663d4fc2a8925d8886af9d1259d2a694f9a4ea7799fb8fb44259d0b188e7860e20c520feb8021c2088709cf77c93ebfef8b42a6e1c8dc8893df0c04
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
+ ```
@@ -59,7 +59,8 @@ class Mettric
59
59
  end
60
60
  end
61
61
  sleep 0.5
62
- raise Mettric::CouldNotStartWorkerThread, exception unless @worker_thread.alive?
62
+ return if @worker_thread.alive?
63
+ raise Mettric::CouldNotStartWorkerThread, exception
63
64
  end
64
65
  end
65
66
 
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
 
@@ -1,3 +1,3 @@
1
1
  class Mettric
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
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.9
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-05-31 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport