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

refactor(agent): reduce number of segments created #1011

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

zsistla
Copy link
Contributor

@zsistla zsistla commented Jan 22, 2025

Instead of a blanket segment_start in the "before" function that needs to be discarded in the majority of the cases, just create the segment when it is needed, add the attributes/metrics, then close the segment.

DONE:Multiverse SQS exception tests need to be updated.
DONE:Needs additional testing against backend.

@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented Jan 22, 2025

Test Suite Status Result
Multiverse 4/8 passing
SOAK 70/72 passing

@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 78.02%. Comparing base (3d71d47) to head (da4253b).

Files with missing lines Patch % Lines
agent/lib_aws_sdk_php.c 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1011      +/-   ##
==========================================
+ Coverage   78.01%   78.02%   +0.01%     
==========================================
  Files         197      197              
  Lines       27422    27418       -4     
==========================================
  Hits        21392    21392              
+ Misses       6030     6026       -4     
Flag Coverage Δ
agent-for-php-7.2 78.15% <ø> (ø)
agent-for-php-7.3 78.17% <ø> (ø)
agent-for-php-7.4 77.88% <ø> (ø)
agent-for-php-8.0 77.25% <ø> (ø)
agent-for-php-8.1 77.76% <0.00%> (+0.01%) ⬆️
agent-for-php-8.2 77.36% <0.00%> (+0.01%) ⬆️
agent-for-php-8.3 77.36% <0.00%> (+0.01%) ⬆️
agent-for-php-8.4 77.38% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@lavarou lavarou changed the title feat(agent): Improve performance by delaying special segment creation. refactor: reduce # of segments created Jan 23, 2025
@zsistla
Copy link
Contributor Author

zsistla commented Jan 23, 2025

Looks good:
image

@zsistla zsistla marked this pull request as ready for review January 23, 2025 17:07
@zsistla zsistla requested review from ZNeumann, mfulb and lavarou January 23, 2025 17:09
agent/lib_aws_sdk_php.c Outdated Show resolved Hide resolved
@zsistla zsistla changed the title refactor: reduce # of segments created refactor(agent): reduce number of segments created Jan 23, 2025
Co-authored-by: Michal Nowacki <[email protected]>
agent/lib_aws_sdk_php.c Outdated Show resolved Hide resolved
lavarou
lavarou previously approved these changes Jan 23, 2025
Co-authored-by: Michal Nowacki <[email protected]>
@zsistla zsistla added this to the next-release milestone Jan 23, 2025
lavarou
lavarou previously approved these changes Jan 23, 2025
@zsistla zsistla merged commit 94a41f5 into dev Jan 31, 2025
65 checks passed
@zsistla zsistla deleted the perf/delay_special_segment_creation branch January 31, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants