timify 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -15
  3. data/lib/timify.rb +1 -1
  4. metadata +7 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87e3f8e1a0aeef9369b178a6b1d7a9981df9c3dc
4
- data.tar.gz: b10790ad239464397fa7c2d817fdfd07b8b8b6bb
3
+ metadata.gz: cc706519775851a3f8ee237c66006942016ad281
4
+ data.tar.gz: 6e7fbdf017468acb3471060eee5ce0e545dcacd8
5
5
  SHA512:
6
- metadata.gz: 80742ca97d2174ad3645fc2b267b24e2cbac846a9f6ce159ceab48e35cde71a285c43a485ea89f575d50002451cf3575cbc3bd704b0cfb1e81cf65fd14bc206b
7
- data.tar.gz: ff925acdae4d2d6fb6912adfd378099b0e1fca3b7840c3c1a96a8dd1f5b70b0840585f12f4377bde6d68e6908ac1897e5c83f084a73a8ca42f5ea5b2a13dc4c7
6
+ metadata.gz: 1889029c68f3717957c9ad62fcd144fc34444431fa77716f698ff5c5c26bd9aeb0256210573a059c5b8393951b2dacb6e41e760d80857d9717fc80f5da1d2116
7
+ data.tar.gz: 1c234170d621da60ad1b71b79d2eb3e85a434d72be7fe51c1cb88ea99bde8c11df3e9c5ac8d6a0371a27e28e344466330e44bc5c2fb37523818d69416b82ccaf
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/timify.svg)](https://rubygems.org/gems/timify)
4
4
 
5
- Ruby gem to calculate the time running from one location to another inside your code and report summaries
5
+ Easily calculates the time running (elapsed time) from one location to another inside your code and reports statistics. It helps you improve your code and find out which part of your code is consuming more time.
6
6
 
7
7
  ## Installation
8
8
 
@@ -44,7 +44,7 @@ The scopes of the instances can be even global so you can measure the elapsed ti
44
44
 
45
45
  ### add
46
46
 
47
- Adds a new point to count the time elapsed. It will count from the last 'add' call or Timify creation in case of the first 'add'.
47
+ Adds a new point to count the elapsed time. It will count from the last 'add' call or Timify creation in case of the first 'add'.
48
48
 
49
49
  You can supply a label that will summarize all the ones with the same label
50
50
 
@@ -59,7 +59,7 @@ t.add
59
59
  #some processes
60
60
  t.add
61
61
  #some processes
62
- send_email_alert if t.add > 0.2
62
+ send_email_alert(t.totals[:message]) if t.add > 0.2
63
63
  #some processes
64
64
  do_log(t.totals[:message]) if t.add > 0.5
65
65
  ```
@@ -72,29 +72,29 @@ In case json parameter supplied as true, the output will be in json format inste
72
72
 
73
73
  The output hash contains:
74
74
 
75
- name: (String) name given for this instance'
75
+ name: (String) name given for this instance'
76
76
 
77
- total_time: (float) total elapsed time from initialization to last 'add' call
77
+ total_time: (float) total elapsed time from initialization to last 'add' call
78
78
 
79
- started: (Time)
79
+ started: (Time)
80
80
 
81
- finished: (Time)
81
+ finished: (Time)
82
82
 
83
- message: (String) a printable friendly message giving all information
83
+ message: (String) a printable friendly message giving all information
84
84
 
85
- locations, labels, ranges: (Hash) the resultant hash contains:
85
+ locations, labels, ranges: (Hash) the resultant hash contains:
86
86
 
87
- secs: (float) number of seconds
87
+ secs: (float) number of seconds
88
88
 
89
- percent: (integer) percentage in reference to the total time
89
+ percent: (integer) percentage in reference to the total time
90
90
 
91
- count: (integer) number of times
91
+ count: (integer) number of times
92
92
 
93
- locations: (Hash) All summary data by location where was called
93
+ locations: (Hash) All summary data by location where was called
94
94
 
95
- labels: (Hash) All summary data by label given on 'add' method
95
+ labels: (Hash) All summary data by label given on 'add' method
96
96
 
97
- ranges: (Hash) All summary data by ranges where was called, from last 'add' call to current 'add' call
97
+ ranges: (Hash) All summary data by ranges where was called, from last 'add' call to current 'add' call
98
98
 
99
99
 
100
100
  Example of output:
@@ -114,7 +114,7 @@ class Timify
114
114
  # json: (boolean) in case of true the output will be in json format instead of a hash
115
115
  #
116
116
  # output: (Hash or json string)
117
- # name: (String) name given for this instance'
117
+ # name: (String) name given for this instance
118
118
  # total_time: (float) total elapsed time from initialization to last 'add' call
119
119
  # started: (Time)
120
120
  # finished: (Time)
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-06 00:00:00.000000000 Z
11
+ date: 2017-11-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Calculates the time running from one location to another inside your
14
- code and reports summaries
13
+ description: Easily calculates the time running (elapsed time) from one location to
14
+ another inside your code and reports statistics. It helps you improve your code
15
+ and find out which part of your code is consuming more time.
15
16
  email: marioruizs@gmail.com
16
17
  executables: []
17
18
  extensions: []
@@ -45,5 +46,6 @@ rubyforge_project:
45
46
  rubygems_version: 2.6.11
46
47
  signing_key:
47
48
  specification_version: 4
48
- summary: Calculates the time running and reports summaries
49
+ summary: Easily calculates the time running (elapsed time) from one location to another
50
+ inside your code and reports statistics.
49
51
  test_files: []