newrelic / newrelic-php-agent

The New Relic PHP Agent
https://opensource.newrelic.com/projects/newrelic/newrelic-php-agent
Apache License 2.0
120 stars 63 forks source link

fix(testing): Fixes count check for apdex metrics #946

Closed mfulb closed 3 months ago

mfulb commented 3 months ago

The current code for EXPECT_METRICS_EXIST would verify the count of any metric was >0 before passing the test. However, with apdex metrics the first field is not the count of metrics but the count of the number of times the transaction time was less than apdex_t. This change allows for the count to be 0 for apdex metrics.

newrelic-php-agent-bot commented 3 months ago
Test Suite Status Result
Multiverse :white_check_mark: 7/7 passing
SOAK :x: 55/56 passing
codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.13%. Comparing base (ef7200a) to head (303e333).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #946 +/- ## ======================================= Coverage 78.13% 78.13% ======================================= Files 194 194 Lines 26857 26857 ======================================= Hits 20984 20984 Misses 5873 5873 ``` | [Flag](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/946/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | Coverage Δ | | |---|---|---| | [agent-for-php-7.2](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/946/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `78.13% <ø> (ø)` | | | [agent-for-php-7.3](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/946/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `78.15% <ø> (ø)` | | | [agent-for-php-7.4](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/946/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.85% <ø> (ø)` | | | [agent-for-php-8.0](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/946/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.88% <ø> (ø)` | | | [agent-for-php-8.1](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/946/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.87% <ø> (ø)` | | | [agent-for-php-8.2](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/946/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.46% <ø> (ø)` | | | [agent-for-php-8.3](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/946/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.46% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.