Module: Benchmeth
- Defined in:
- lib/benchmeth.rb,
lib/benchmeth/version.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Constant Summary collapse
- VERSION =
"0.2.0"
Class Attribute Summary collapse
-
.on_benchmark_block ⇒ Object
Returns the value of attribute on_benchmark_block.
-
.use_notifications ⇒ Object
Returns the value of attribute use_notifications.
Class Method Summary collapse
Class Attribute Details
.on_benchmark_block ⇒ Object
Returns the value of attribute on_benchmark_block.
8 9 10 |
# File 'lib/benchmeth.rb', line 8 def on_benchmark_block @on_benchmark_block end |
.use_notifications ⇒ Object
Returns the value of attribute use_notifications.
8 9 10 |
# File 'lib/benchmeth.rb', line 8 def use_notifications @use_notifications end |
Class Method Details
.monotonic_time ⇒ Object
23 24 25 |
# File 'lib/benchmeth.rb', line 23 def self.monotonic_time Process.clock_gettime(Process::CLOCK_MONOTONIC) end |
.on_benchmark(&block) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/benchmeth.rb', line 15 def self.on_benchmark(&block) if block_given? self.on_benchmark_block = block else self.on_benchmark_block end end |