New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `[]' for nil:NilClass #40

Closed
ChrisBr opened this Issue Aug 28, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@ChrisBr
Copy link
Contributor

ChrisBr commented Aug 28, 2018

I get the following exception when running benchmark-driver with the gruff output plugin:

benchmark_1  | /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/bulk_output.rb:54:in `report': undefined method `[]' for nil:NilClass (NoMethodError)
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/output.rb:85:in `report'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner/ips.rb:40:in `block (4 levels) in run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/output.rb:72:in `block in with_context'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/bulk_output.rb:49:in `with_context'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-output-gruff-0.3.1/lib/benchmark_driver/output/gruff.rb:60:in `with_context'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/output.rb:71:in `with_context'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner/ips.rb:39:in `block (3 levels) in run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/output.rb:62:in `block in with_job'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/bulk_output.rb:43:in `with_job'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-output-gruff-0.3.1/lib/benchmark_driver/output/gruff.rb:55:in `with_job'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/output.rb:61:in `with_job'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner/ips.rb:34:in `block (2 levels) in run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner/ips.rb:31:in `map'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner/ips.rb:31:in `block in run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/bulk_output.rb:28:in `with_warmup'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/output.rb:51:in `with_warmup'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner/ips.rb:30:in `run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:40:in `block (4 levels) in run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:95:in `rescue in with_clean_env'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:90:in `with_clean_env'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:39:in `block (3 levels) in run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:30:in `each'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:30:in `block (2 levels) in run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:29:in `each'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:29:in `block in run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:28:in `each'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/lib/benchmark_driver/runner.rb:28:in `run'
benchmark_1  | 	from /usr/lib64/ruby/gems/2.4.0/gems/benchmark_driver-0.14.6/exe/benchmark-driver:118:in `<top (required)>'
benchmark_1  | 	from /usr/bin/benchmark-driver.ruby2.4:22:in `load'
benchmark_1  | 	from /usr/bin/benchmark-driver.ruby2.4:22:in `<main>'

ChrisBr added a commit to ChrisBr/benchmark-driver that referenced this issue Aug 28, 2018

Fix undefined method `[]' in BulkOutput#report
when running the warm up, @job_context_result is not defined
to we should check this before assigning the results.

This is similar to what is done in BenchmarkDriver::Output::Compare#report

fix benchmark-driver#40

@k0kubun k0kubun closed this in #41 Aug 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment