Skip to content
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

DEBUG-2657 prefix benchmark names with the product as per their source file #3828

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

p-datadog
Copy link
Contributor

What does this PR do?

Prefixes each benchmark name with the product prefix.

Motivation:

At 37 current benchmarks, their list is awkward to look through. The prefix will make benchmarks grouped by product which will make them easier to read.

Additional Notes:

How to test the change?

Benchmark platform UI

Unsure? Have a question? Request a review!

@p-datadog p-datadog requested a review from a team as a code owner August 6, 2024 17:25
@github-actions github-actions bot added the dev/testing Involves testing processes (e.g. RSpec) label Aug 6, 2024
@pr-commenter
Copy link

pr-commenter bot commented Aug 6, 2024

Benchmarks

Benchmark execution time: 2024-08-12 12:33:10

Comparing candidate commit 98b4298 in PR branch benchmark-dry-2 with baseline commit 46c8c8b in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 23 metrics, 2 unstable metrics.

Comment on lines 5 to 15
module JobReporter
def report(name, *args, **opts, &block)
caller_path = caller_locations.first.path
prefix = File.basename(caller_path).sub(/_.*\z/, '')
super("#{prefix} - #{name}", *args, **opts, &block)
end
end

class Benchmark::IPS::Job
prepend JobReporter
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be breaking (older?) versions of benchmark/ips (on older Rubies)

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@codecov-commenter
Copy link

codecov-commenter commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.83%. Comparing base (46c8c8b) to head (98b4298).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3828   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files        1264     1264           
  Lines       75678    75678           
  Branches     3720     3720           
=======================================
+ Hits        74039    74042    +3     
+ Misses       1639     1636    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@p-datadog
Copy link
Contributor Author

List of benchmarks looks like this now:

benchmark-list

* master:
  Suppress startup logs in test and development environments
  [PROF-10241] Fix issue in tests by simplifying `at_fork` monkey patch
  Minor: Check pid before hash
  Rename ProcessDaemonMonkeyPatch -> ProcessMonkeyPatch
  [PROF-10241] Use Process._fork hook in `at_fork` monkey patch on Ruby 3.1+
  Minor: Bootstrap empty rbs file
  Rubocop fixes
  Update Steepfile
  Add note about not re-registering the same block
  [PROF-10241] Extract profiler `at_fork` monkey patch to utils
  Remove typechecking skeleton
  Rename `Kernel` monkey patch to `KernelMonkeyPatch` to avoid confusion
  Rename `at_fork` -> `datadog_at_fork` to avoid any clashes
  Minor: Avoid returning process after monkey patching
  Rename ProcessDaemonPatch -> ProcessDaemonMonkeyPatch
  Clean up test skipping to not depend on profiling
  Minor: Clean up storage initialization + don't leak storage
  Quick pass at cleaning up/refreshing comments
@p-datadog p-datadog merged commit 92b624d into master Aug 12, 2024
186 checks passed
@p-datadog p-datadog deleted the benchmark-dry-2 branch August 12, 2024 13:13
@github-actions github-actions bot added this to the 2.3.0 milestone Aug 12, 2024
p-datadog pushed a commit to p-datadog/dd-trace-rb that referenced this pull request Aug 12, 2024
* master: (31 commits)
  DEBUG-2657 prefix benchmark names with the product as per their source file (DataDog#3828)
  [NO-TICKET] Don't put results in benchmarking folder directly
  Suppress startup logs in test and development environments
  [PROF-10241] Fix issue in tests by simplifying `at_fork` monkey patch
  Minor: Check pid before hash
  Rename ProcessDaemonMonkeyPatch -> ProcessMonkeyPatch
  [PROF-10241] Use Process._fork hook in `at_fork` monkey patch on Ruby 3.1+
  Minor: Bootstrap empty rbs file
  Rubocop fixes
  Update Steepfile
  Add note about not re-registering the same block
  [PROF-10241] Extract profiler `at_fork` monkey patch to utils
  Remove typechecking skeleton
  Rename `Kernel` monkey patch to `KernelMonkeyPatch` to avoid confusion
  Rename `at_fork` -> `datadog_at_fork` to avoid any clashes
  Minor: Avoid returning process after monkey patching
  Rename ProcessDaemonPatch -> ProcessDaemonMonkeyPatch
  Clean up test skipping to not depend on profiling
  Minor: Clean up storage initialization + don't leak storage
  Quick pass at cleaning up/refreshing comments
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/testing Involves testing processes (e.g. RSpec)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants