benchmark_driver 0.14.0 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7493fee045d80ab0918a271649807b7a984e30a6c2e90aa39d4a35d8c19e4198
4
- data.tar.gz: 04d607c363d64d0f2c2c3e2fd6c6f107d1ad924eb757e048f112131249660a6b
3
+ metadata.gz: d42a2e3e7d94104803eecb93f76393989ee40e689164532dc221cd196cd394f8
4
+ data.tar.gz: d0a6b59e3339737f8e8bbaa0aad41ef38625b0cfc53fd1e0e815526a3a63e20a
5
5
  SHA512:
6
- metadata.gz: 496a23c97b27783b2fef8f1da1a31a10c4e1efa4b2c487acd400ee2687f2c58e5d458fa800355a6121cc4728a0af6077c87a4067b524f9e71506ef21cde74ebd
7
- data.tar.gz: c65d611995c53f273a803234e9bd9c9d31cd6edbfc1a79a92066a5f6a438583cf601eb54319d3e81b18ab4c9f06a2e13b3e642155307e8555a1b2fd9f465ffca
6
+ metadata.gz: 4e4bf62cc60805348e47ddc6dac324d77aff246916f97b3a8dfbb2cf41871de4bf596c10bbc1939b47d28440682541c7e83a037353e84e6cd55f776d2f2aa281
7
+ data.tar.gz: 9457a207ee7cd0cb68ea42b8796ea35c8f3568fcea8d6f4bd14c7ab67044cf8f98686f1f5845ae6134ca3134ecd163f17ca86699025f91876453286dde0e3aba
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # v0.14.2
2
+
3
+ - Fix definitive error in v0.14.1...
4
+
5
+ # v0.14.1 (yanked)
6
+
7
+ - Fix `BenchmarkDriver::BulkOutput` error on contexts with prelude [#38](https://github.com/benchmark-driver/benchmark-driver/issues/38)
8
+
1
9
  # v0.14.0
2
10
 
3
11
  - `benchmark-driver` command also takes `*.rb` file to run single-execution benchmark
@@ -66,8 +66,8 @@ module BenchmarkDriver
66
66
  # @param [String] name
67
67
  # @param [BenchmarkDriver::Config::Executable] executable
68
68
  # @param [Hash{ String => String}] gems
69
- def with_context(name:, executable:, gems: {}, &block)
70
- context = BenchmarkDriver::Context.new(name: name, executable: executable, gems: gems)
69
+ def with_context(name:, executable:, gems: {}, prelude: '', &block)
70
+ context = BenchmarkDriver::Context.new(name: name, executable: executable, gems: gems, prelude: prelude)
71
71
  @output.with_context(context) do
72
72
  block.call
73
73
  end
@@ -36,7 +36,7 @@ class BenchmarkDriver::Runner::Ips
36
36
  duration, loop_count = run_warmup(job, context: context)
37
37
  value, duration = value_duration(duration: duration, loop_count: loop_count)
38
38
 
39
- @output.with_context(name: context.name, executable: context.executable, gems: context.gems) do
39
+ @output.with_context(name: context.name, executable: context.executable, gems: context.gems, prelude: context.prelude) do
40
40
  @output.report(values: { metric => value }, duration: duration, loop_count: loop_count)
41
41
  end
42
42
 
@@ -55,7 +55,7 @@ class BenchmarkDriver::Runner::Ips
55
55
  value, duration = BenchmarkDriver::Repeater.with_repeat(repeat_params) do
56
56
  run_benchmark(job, context: context)
57
57
  end
58
- @output.with_context(name: context.name, executable: context.executable, gems: context.gems) do
58
+ @output.with_context(name: context.name, executable: context.executable, gems: context.gems, prelude: context.prelude) do
59
59
  @output.report(values: { metric => value }, duration: duration, loop_count: job.loop_count)
60
60
  end
61
61
  end
@@ -46,7 +46,7 @@ class BenchmarkDriver::Runner::Memory
46
46
  value = BenchmarkDriver::Repeater.with_repeat(config: @config, larger_better: false) do
47
47
  run_benchmark(job, context: context)
48
48
  end
49
- @output.with_context(name: context.name, executable: context.executable, gems: context.gems) do
49
+ @output.with_context(name: context.name, executable: context.executable, gems: context.gems, prelude: context.prelude) do
50
50
  @output.report(values: { METRIC => value }, loop_count: job.loop_count)
51
51
  end
52
52
  end
@@ -41,7 +41,7 @@ class BenchmarkDriver::Runner::Once
41
41
  value = 1.0 / duration
42
42
  end
43
43
 
44
- @output.with_context(name: context.name, executable: context.executable, gems: context.gems) do
44
+ @output.with_context(name: context.name, executable: context.executable, gems: context.gems, prelude: context.prelude) do
45
45
  @output.report(values: { METRIC => value }, duration: duration, loop_count: 1)
46
46
  end
47
47
  end
@@ -50,7 +50,12 @@ class BenchmarkDriver::Runner::Recorded
50
50
  records.each do |record|
51
51
  @output.with_job(name: record.name) do
52
52
  record.benchmark_results.each do |context, result|
53
- @output.with_context(name: context.name, executable: context.executable, gems: context.gems) do
53
+ @output.with_context(
54
+ name: context.name,
55
+ executable: context.executable,
56
+ gems: context.gems,
57
+ prelude: context.prelude,
58
+ ) do
54
59
  @output.report(
55
60
  values: result.values,
56
61
  duration: result.duration,
@@ -1,3 +1,3 @@
1
1
  module BenchmarkDriver
2
- VERSION = '0.14.0'
2
+ VERSION = '0.14.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-09 00:00:00.000000000 Z
11
+ date: 2018-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler