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

[NO-TICKET] Finish autoformatting profiler with standardrb #3845

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Aug 14, 2024

What does this PR do?

In #3801 we adopted standardrb for the profiler. At the time, I left a few cops disabled:

This is because fixing each of these cops will create a LOT of diff noise. Thus, I've explicitly not included them in this PR, and plan to fix them separately, in smaller PRs, so we can still sanely review the diff on this PR.

This PR contains one of the most noisiest changes, which is using " for strings instead of '.

After this PR lands, all of the profiler is matching standardrb's expected style (except trailing commas, see discussion on #3801).

Motivation:

Fully adopt standardrb for profiling.

Additional Notes:

N/A

How to test the change?

This PR does not change any behaviors, so existing test coverage being green is the thing to aim for :)

@ivoanjo ivoanjo requested review from a team as code owners August 14, 2024 16:22
@github-actions github-actions bot added the profiling Involves Datadog profiling label Aug 14, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 99.00000% with 16 lines in your changes missing coverage. Please review.

Project coverage is 97.83%. Comparing base (7c67ce3) to head (59d640c).

Files Patch % Lines
...filing/collectors/cpu_and_wall_time_worker_spec.rb 97.70% 3 Missing ⚠️
...c/datadog/profiling/ext/dir_monkey_patches_spec.rb 96.29% 3 Missing ⚠️
spec/datadog/profiling/stack_recorder_spec.rb 97.91% 3 Missing ⚠️
...iling_native_extension/native_extension_helpers.rb 84.61% 2 Missing ⚠️
...datadog/profiling/native_extension_helpers_spec.rb 98.00% 2 Missing ⚠️
spec/datadog/profiling/collectors/info_spec.rb 93.75% 1 Missing ⚠️
spec/datadog/profiling/collectors/stack_spec.rb 99.20% 1 Missing ⚠️
spec/datadog/profiling/crashtracker_spec.rb 97.22% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3845      +/-   ##
==========================================
- Coverage   97.84%   97.83%   -0.01%     
==========================================
  Files        1264     1264              
  Lines       75726    75725       -1     
  Branches     3729     3729              
==========================================
- Hits        74094    74087       -7     
- Misses       1632     1638       +6     

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

@pr-commenter
Copy link

pr-commenter bot commented Aug 14, 2024

Benchmarks

Benchmark execution time: 2024-08-14 16:56:30

Comparing candidate commit 59d640c in PR branch ivoanjo/finish-profiler-standardrb-migration with baseline commit 7c67ce3 in branch master.

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

scenario:profiler - hold / resume

  • 🟥 throughput [-73367.867op/s; -71529.071op/s] or [-3.510%; -3.422%]

scenario:tracing - Propagation - Trace Context

  • 🟥 throughput [-1365.750op/s; -1244.481op/s] or [-3.523%; -3.210%]

Copy link
Contributor

@AlexJF AlexJF left a comment

Choose a reason for hiding this comment

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

Didn't spot any sneaky cryptomining code so LGTM!

@AlexJF
Copy link
Contributor

AlexJF commented Aug 14, 2024

Found 0 performance improvements and 2 performance regressions! Performance is the same for 21 metrics, 2 unstable metrics.
scenario:profiler - hold / resume
🟥 throughput [-73367.867op/s; -71529.071op/s] or [-3.510%; -3.422%]

Oh this won't do @ivoanjo can we switch back to single quotes? :trollface:

@ivoanjo
Copy link
Member Author

ivoanjo commented Aug 15, 2024

Found 0 performance improvements and 2 performance regressions! Performance is the same for 21 metrics, 2 unstable metrics.
scenario:profiler - hold / resume
🟥 throughput [-73367.867op/s; -71529.071op/s] or [-3.510%; -3.422%]

Oh this won't do @ivoanjo can we switch back to single quotes? :trollface:

Oh no, single quotes are faster confirmed! Fire up the youtube channels!

Running the profiling benchmarks for PRs is a really new change (#3810) so I haven't had time to look into it, but seems that some of the benchmarks are not very stable.

Maybe we just need to run them for longer, or maybe they need some tweaking to not provide false-positives? 🤔

@ivoanjo ivoanjo merged commit d2498fb into master Aug 15, 2024
186 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/finish-profiler-standardrb-migration branch August 15, 2024 07:50
@github-actions github-actions bot added this to the 2.3.0 milestone Aug 15, 2024
@ivoanjo ivoanjo added the dev/internal Other internal work that does not need to be included in the changelog label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/internal Other internal work that does not need to be included in the changelog profiling Involves Datadog profiling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants