Skip to content

Conversation

ZNeumann
Copy link
Contributor

No description provided.

mfulb and others added 4 commits April 21, 2025 14:39
…Ps 8.0+ (#1042)

Reduce agent’s CPU overhead when observer API is used to hook
into Zend Engine. This is achieved by:
* Simplifying the checks the agent needs to perform to determine if
special instrumentation for user function is provided. Before this
change, on every function execution the agent used a hashmap to check if
special instrumentation for user function is provided. However, when the
observer API is used to hook into Zend Engine, this can be done only
once per user function execution at the time when the user function is
executed for the first time.
* Reducing the number of times the name of the file is compared with the
list of ‘magic files’ to detect package and/or framework used. Before
this change on every file execution the agent scanned the list of magic
files twice. However, when the observer API is used to hook into Zend
Engine, this can be done only once per file execution.

---------

Co-authored-by: Amber Sistla <[email protected]>
Adds support for Drupal Attribute Hooks added in Drupal 11.1.
Make log messages easier to understand when adding a named custom tracer
by logging only a single message. Instead of logging one message when
the wraprec is added, and two messages when wraprec is re-used, log a
single message that indicates if the wraprec was added or re-used.
@ZNeumann ZNeumann requested a review from zsistla May 12, 2025 20:53
@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented May 12, 2025

Test Suite Status Result
Multiverse 8/8 passing
SOAK 85/85 passing

@hahuja2 hahuja2 self-requested a review May 12, 2025 21:50
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2025

Codecov Report

Attention: Patch coverage is 86.75676% with 49 lines in your changes missing coverage. Please review.

Project coverage is 77.27%. Comparing base (2003afb) to head (5b84fc8).

Files with missing lines Patch % Lines
agent/php_user_instrument.c 72.58% 17 Missing ⚠️
agent/php_user_instrument_wraprec_hashmap.c 93.53% 15 Missing ⚠️
agent/php_execute.c 14.28% 6 Missing ⚠️
agent/php_observer.c 62.50% 6 Missing ⚠️
agent/fw_drupal8.c 89.58% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1062      +/-   ##
==========================================
+ Coverage   77.14%   77.27%   +0.13%     
==========================================
  Files         198      199       +1     
  Lines       27991    28327     +336     
==========================================
+ Hits        21593    21890     +297     
- Misses       6398     6437      +39     
Flag Coverage Δ
agent-for-php-7.2 77.47% <77.13%> (+0.01%) ⬆️
agent-for-php-7.3 77.49% <77.13%> (+0.01%) ⬆️
agent-for-php-7.4 77.36% <90.84%> (+0.17%) ⬆️
agent-for-php-8.0 76.56% <87.64%> (-0.02%) ⬇️
agent-for-php-8.1 76.88% <87.64%> (-0.02%) ⬇️
agent-for-php-8.2 76.50% <87.64%> (-0.01%) ⬇️
agent-for-php-8.3 76.50% <87.64%> (-0.01%) ⬇️
agent-for-php-8.4 76.52% <87.67%> (-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.

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

@ZNeumann ZNeumann merged commit 143cf0c into main May 13, 2025
129 checks passed
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.

8 participants