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 +4 -4
- data/README.md +4 -0
- data/lib/execution_time.rb +2 -2
- data/lib/execution_time/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45866a2169cfa32f2c5f997b9024a6bc9c2391aa0884d5db473fb3430b1d9acf
|
4
|
+
data.tar.gz: efa1214e1d79f36575d049ee5275dbb5c61f4686e848780723ced7416dd39762
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 650db07957ae748115639fbd55db584278188ea5df8a8226c665421fb4df073ab06490e597bd4ac0f75f235ce8d7810f048cb8f5da3774cbff420c457af089cc
|
7
|
+
data.tar.gz: f2352ff698164ad0405f215959d5b17141513cd00dd956d1e315cfe883aa968072a51cb27bf78309f84b0986598734db350ad444f814e613d77e326281891055
|
data/README.md
CHANGED
data/lib/execution_time.rb
CHANGED
@@ -47,14 +47,14 @@ module ExecutionTime
|
|
47
47
|
|
48
48
|
AppMetrics.reset
|
49
49
|
|
50
|
-
start =
|
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 = (
|
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}"
|
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.
|
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-
|
11
|
+
date: 2020-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|