Skip to content

Conversation

nr-swilloughby
Copy link
Contributor

This PR brings the Go APM agent profiling code into the develop branch for additional testing and evaluation prior to being released.

@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.50%. Comparing base (03b5749) to head (f8ac76f).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1081      +/-   ##
===========================================
- Coverage    78.04%   75.50%   -2.54%     
===========================================
  Files          159      160       +1     
  Lines        15811    16386     +575     
===========================================
+ Hits         12340    12373      +33     
- Misses        3058     3587     +529     
- Partials       413      426      +13     

see 8 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03b5749...f8ac76f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Newrelic-Boomi
Copy link

}
hypot = math.Hypot(123.56789, 23.4567889)
gamma3 = math.Gamma(3)
xy = math.Pow(20, 3.5)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Put in the iteration value here to avoid possible optimization by the compiler.

newrelic.ProfilingTypeMutex|
newrelic.ProfilingTypeThreadCreate|
newrelic.ProfilingTypeBlock),
newrelic.ConfigProfilingSampleInterval(time.Millisecond*500),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Idea for docs: make recommendation for default value that comes out of performance testing

log.Printf("Profiling: %v every %v", c.Profiling.SelectedProfiles.Strings(), c.Profiling.Interval)
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

add a comment here explaining the need to increase the max samples stored limit

whatHappened, differences := jsondiff.Compare([]byte(expect), []byte(out), &o)
t.Errorf("Config fields not as expected: %s:", whatHappened)
t.Error(differences)
//t.Error(expect)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

let's replace jsondiff with an internal tool

@@ -439,7 +439,7 @@ func TestAppProcess_ConnectChan_TraceObserverVariants(t *testing.T) {

select {
case <-testApp.app.shutdownComplete:
case <-time.After(2 * timeout):
case <-time.After(80 * timeout):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was increased because the unit test was timing out and failing otherwise for some reason.

app.app.profiler.cpuSampleRateHz = hz
app.app.profiler.lock.Unlock()
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

look at whether there's a reasonable set of min/max limits to enforce for each of the configuration values and enforce what those are.

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