evt-diagnostics-sample 0.2.1.0 → 0.2.2.0

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: 134ba02775d5b826e4f3fda67922123d60d71f7a2a7bd9f8a5ab288364f83435
4
- data.tar.gz: 88fd2fe5929b34c46d776135a094ea11d0d85ede59596ca03b189bc5f660051e
3
+ metadata.gz: 59bf27312b5e697487459aad5eb87281b9e52ea876187df176ac9a6952032b86
4
+ data.tar.gz: 61eb387f63ccb5bef4756759f5596b43f358859d9504c6179ee8a0464781e0f9
5
5
  SHA512:
6
- metadata.gz: 32e5180484ae331265c2f662163179ed202d2285b8a68ec47b817190f0930c3b17ae143b3a22a989619c4ebd88d4ed6eafa1c74182c27c721b04009150f6ccee
7
- data.tar.gz: 39b890d8aeaaa742f557e4cc747803c5efbc5cefa117b8fbf91e6150dca885443ef7aea095e1cd57bd6aaec69440e12546d296116020295d29a7e1882b6a2b0a
6
+ metadata.gz: f20e7ce26b8d1aa9c48ac4844e60d4d89f5eb2793a14e6689094b7da419700e3f61ef575666389cce8e0c092dd21fb3fa62b3a4ec703d636e02b9d0eb126ee04
7
+ data.tar.gz: 6b3b14cbf089d37d0f0b46118a3db636b840ca7f8f124c346b4330095ec49676d3618119b23ec148e8439ec166d38a853419b02e31d0a6d64ac05d89897d0bf0
@@ -8,8 +8,8 @@ require 'schema'
8
8
 
9
9
  require 'diagnostics/sample/defaults'
10
10
  require 'diagnostics/sample/log'
11
- require 'diagnostics/sample/measure'
12
11
  require 'diagnostics/sample/measure/clock'
12
+ require 'diagnostics/sample/measure'
13
13
  require 'diagnostics/sample/result'
14
14
 
15
15
  require 'diagnostics/sample/sample'
@@ -34,14 +34,14 @@ module Diagnostics
34
34
  instance.()
35
35
  end
36
36
 
37
- def call
37
+ def call(arg=nil)
38
38
  logger.trace { "Measuring action (GC: #{gc.inspect})" }
39
39
 
40
40
  ::GC.disable unless gc
41
41
 
42
42
  start_time = clock.now
43
43
 
44
- action.()
44
+ action.(arg)
45
45
 
46
46
  end_time = clock.now
47
47
 
@@ -40,8 +40,8 @@ module Diagnostics
40
40
  def call
41
41
  logger.trace { "Starting warmup (Warmup Cycles: #{warmup_cycles})" }
42
42
 
43
- warmup_cycles.times do
44
- elapsed_time_nanoseconds = measure.()
43
+ warmup_cycles.times do |iteration|
44
+ elapsed_time_nanoseconds = measure.(iteration)
45
45
 
46
46
  elapsed_time = milliseconds(elapsed_time_nanoseconds)
47
47
 
@@ -52,8 +52,8 @@ module Diagnostics
52
52
 
53
53
  logger.trace { "Starting sample (Cycles: #{cycles}, Warmup Cycles: #{warmup_cycles})" }
54
54
 
55
- cycles.times do
56
- elapsed_time_nanoseconds = measure.()
55
+ cycles.times do |iteration|
56
+ elapsed_time_nanoseconds = measure.(iteration + self.warmup_cycles)
57
57
 
58
58
  elapsed_time = milliseconds(elapsed_time_nanoseconds)
59
59
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-diagnostics-sample
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1.0
4
+ version: 0.2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project