Skip to content

Conversation

@petergebala
Copy link
Contributor

@petergebala petergebala commented Feb 19, 2025

Co-authored-by: @kikorb

Added support for label in benchmark block ex:

class A < Opera::Base
  step :method_1
  step :method_2
  benchmark :slow_methods do
    step :method_3
    step :method_4
  end
end

a = A.call()
a.information[:slow_method] # returns { real: xxx, total: yyy }

Add support for instrumentation

class A < Opera::Base
  configure do |config|
    config.instrumentation_class = Datadog::Tracer
    config.instrumentation_method = :trace
    config.instrumentation_options = { level: :step }
  end

  step :method_1
  step :method_2
  step :method_3
  step :method_4
end

a = A.call()
a.information[:slow_method] # returns { real: xxx, total: yyy }

@kikorb kikorb merged commit f6b6a8d into master Feb 21, 2025
3 checks passed
@kikorb kikorb deleted the add-support-for-label-in-benchmark branch February 21, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants