execution_time 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 6f18a74e2fd925985154a51464fd05101bbaa23f1d3e4ba3b66f80a7d3a88173
4
- data.tar.gz: f201b8e48c7dd34b32df183ffbdce19ee95f047e1f4a66d182a923fcc13952cd
3
+ metadata.gz: 45866a2169cfa32f2c5f997b9024a6bc9c2391aa0884d5db473fb3430b1d9acf
4
+ data.tar.gz: efa1214e1d79f36575d049ee5275dbb5c61f4686e848780723ced7416dd39762
5
5
  SHA512:
6
- metadata.gz: 334c7b1d8d7bfa62d43f54b05b3366389540a6076babb5a448036ccf82609bd54e60ead4cbce9a118b6a26ef9f5375cd4cfb22b9ebb46271adaf2f188652edcf
7
- data.tar.gz: 741ce85c6c3768b77edf9aa1643c6af001b5be60c508d9f51594d72a83f430dd0f3de9c41010e4775a3b364a0cb58c41d70b55fa436adebeda78aa207370fbd9
6
+ metadata.gz: 650db07957ae748115639fbd55db584278188ea5df8a8226c665421fb4df073ab06490e597bd4ac0f75f235ce8d7810f048cb8f5da3774cbff420c457af089cc
7
+ data.tar.gz: f2352ff698164ad0405f215959d5b17141513cd00dd956d1e315cfe883aa968072a51cb27bf78309f84b0986598734db350ad444f814e613d77e326281891055
data/README.md CHANGED
@@ -35,5 +35,9 @@ By default gem is enabled.
35
35
 
36
36
  You are welcome to contribute.
37
37
 
38
+ ## Contributos
39
+
40
+ - https://github.com/nbulaj
41
+
38
42
  ## License
39
43
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -47,14 +47,14 @@ module ExecutionTime
47
47
 
48
48
  AppMetrics.reset
49
49
 
50
- start = Time.now
50
+ start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
51
51
  before = GC.stat(:total_allocated_objects)
52
52
  ActiveRecord::LogSubscriber.reset_runtime
53
53
 
54
54
  result = yield
55
55
 
56
56
  after = GC.stat(:total_allocated_objects)
57
- duration = (Time.now - start)
57
+ duration = (Process.clock_gettime(Process::CLOCK_MONOTONIC) - start)
58
58
  db_after = ActiveRecord::LogSubscriber.reset_runtime
59
59
 
60
60
  info = "Completed in #{(duration * 1000).round(1)}ms | Allocations: #{after - before}"
@@ -1,3 +1,3 @@
1
1
  module ExecutionTime
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: execution_time
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-02 00:00:00.000000000 Z
11
+ date: 2020-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails