Class: ExcADG::Payload::Example::Benchmark
- Inherits:
-
Object
- Object
- ExcADG::Payload::Example::Benchmark
- Includes:
- ExcADG::Payload
- Defined in:
- lib/excadg/payload/example.rb
Overview
payload that occupies a CPU core for several seconds, is suitable for perfomance tests
Instance Attribute Summary
Attributes included from ExcADG::Payload
Instance Method Summary collapse
Methods included from ExcADG::Payload
Instance Method Details
#get ⇒ Object
64 65 66 67 68 69 70 |
# File 'lib/excadg/payload/example.rb', line 64 def get lambda { Log.info(::Benchmark.measure { 10_000.downto(1) { |i| 10_000.downto(1) { |j| i * j } } }) } end |