ManageIQ / more_core_extensions

MoreCoreExtensions are a set of core extensions beyond those provided by ActiveSupport.
MIT License
5 stars 23 forks source link

Extract Benchmark.realtime_store/block from manageiq-gems-pending #65

Closed Fryguy closed 5 years ago

Fryguy commented 5 years ago

@bdunne @jrafanie Please review.

Note a change from the original [ref] ...previously this registered a logger and logged exceptions. Instead, at the library level it makes more sense to me that the caller handle the logging. So as not to lose the timings, however, we can modify the exception to add the timing metadata to it.

miq-bot commented 5 years ago

Checked commits https://github.com/Fryguy/more_core_extensions/compare/3329d734eaeb7282ae65eb211c88f946d6bc9347~...f4eee52773a5b3c2566a6cae954ff0d04c23d7de with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 4 files checked, 6 offenses detected

lib/more_core_extensions/core_ext/benchmark/realtime_store.rb

spec/core_ext/benchmark/realtime_store_spec.rb

Fryguy commented 5 years ago

As a follow up, I think we should replace the class variable with some thread local variable and/or thread_mattr_accessor