schwad_performance_logger 0.3.0 → 0.3.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 912ce10f567df0801f90fb5acf0c19262b9bd3a8c263fcb03518a1e3b9e75713
|
4
|
+
data.tar.gz: 7504dbcafbd7d595e37c9e7a4afe45df6c23a01aefd0bc492a583342b747d198
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 374b2cc008a159510090fc19d0a54402e1c080ab4a2e0afff493c11225dde239de02b3a3c2ab8b3adffdb75f867136996fba391838837093545101fbf311ba71
|
7
|
+
data.tar.gz: 92f1a3fe5b1a58d8cf5b7aeaaf78f9ab6fa5010c8911fc7d0fed861d115321fe412b5ab69922f597d655657c5c39e2fc345ade6fb25fdfa87bf069cd7f940ee8
|
@@ -5,7 +5,6 @@ require 'get_process_mem'
|
|
5
5
|
require 'benchmark/ips'
|
6
6
|
require 'schwad_performance_logger/schwad_performance_logger'
|
7
7
|
|
8
|
-
|
9
8
|
module SchwadPerformanceLogger
|
10
9
|
def self.new(opts={})
|
11
10
|
if opts.is_a?(Hash)
|
@@ -27,14 +26,14 @@ module SchwadPerformanceLogger
|
|
27
26
|
|
28
27
|
def self.time
|
29
28
|
suppress_output do
|
30
|
-
length_of_time = []
|
29
|
+
@length_of_time = []
|
31
30
|
10.times do
|
32
31
|
start_time = Time.now
|
33
32
|
yield
|
34
|
-
length_of_time << Time.now - start_time
|
33
|
+
@length_of_time << Time.now - start_time
|
35
34
|
end
|
36
35
|
end
|
37
|
-
puts "Average runtime #{length_of_time.sum / 10.0} seconds. Max time #{length_of_time.max}.seconds"
|
36
|
+
puts "Average runtime #{@length_of_time.sum / 10.0} seconds. Max time #{@length_of_time.max}.seconds"
|
38
37
|
end
|
39
38
|
|
40
39
|
private
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schwad_performance_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Schwaderer
|
@@ -101,6 +101,8 @@ files:
|
|
101
101
|
- lib/schwad_performance_logger.rb
|
102
102
|
- lib/schwad_performance_logger/schwad_performance_logger.rb
|
103
103
|
- lib/schwad_performance_logger/version.rb
|
104
|
+
- schwad_performance_logger-0.2.0.gem
|
105
|
+
- schwad_performance_logger-0.3.0.gem
|
104
106
|
- schwad_performance_logger.gemspec
|
105
107
|
homepage: https://schwad.github.io
|
106
108
|
licenses:
|