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

[PROF-8328] Import java-profiler PID controller and port it to C #3190

Merged
merged 5 commits into from
Oct 6, 2023

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Oct 6, 2023

What does this PR do?

This PR:

  • Imports the pidController.h and pidController.cpp from the java-profiler library
  • Ports the PidController class to C, to match the rest of the Ruby profiler

I've recorded the porting steps in multiple commits, and as much as possible tried to keep the conventions and structure of the original code.

In practice, this does not yet change anything in the Ruby profiler, since these files are not yet used.

Motivation:

I plan to use the PID controller to control how often we take samples in the allocation profiler, like the Java profiler does.

Additional Notes:

I plan to ask the folks from the Java profiler to review this one :)

How to test the change?

This code is not yet used; it'll get tested when it gets integrated into the allocation profiler.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

@ivoanjo ivoanjo requested a review from a team as a code owner October 6, 2023 09:58
@github-actions github-actions bot added the profiling Involves Datadog profiling label Oct 6, 2023
Copy link

@jbachorik jbachorik left a comment

Choose a reason for hiding this comment

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

Looking good!

@codecov-commenter
Copy link

Codecov Report

Merging #3190 (88df016) into master (c8de363) will decrease coverage by 0.02%.
Report is 77 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3190      +/-   ##
==========================================
- Coverage   98.21%   98.19%   -0.02%     
==========================================
  Files        1247     1250       +3     
  Lines       71664    71910     +246     
  Branches     3329     3355      +26     
==========================================
+ Hits        70382    70610     +228     
- Misses       1282     1300      +18     
Files Coverage Δ
...iling_native_extension/native_extension_helpers.rb 96.73% <100.00%> (ø)

... and 21 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ivoanjo ivoanjo merged commit f065ac2 into master Oct 6, 2023
@ivoanjo ivoanjo deleted the ivoanjo/prof-8328-profiler-pid-controller branch October 6, 2023 11:05
@github-actions github-actions bot added this to the 1.15.0 milestone Oct 6, 2023
ivoanjo added a commit that referenced this pull request Feb 9, 2024
**What does this PR do?**

This PR removes the unused profiler PID controller implementation.

**Motivation:**

In #3190 we imported the PID controller, and planned to use it to
control the allocation profiler. In the end, we ended up going with
a different solution for that (#3395) so let's remove the PID controller
for now.

We can always revert this commit if we need it again.

**Additional Notes:**

N/A

**How to test the change?**

Validate that CI is still green :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
profiling Involves Datadog profiling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants