Skip to content

Update to use DDOG_CHARSLICE_C and new DDOG_CHARSLICE_C_BARE helpers#2565

Merged
bwoebi merged 2 commits intomasterfrom
ivoanjo/update-libdatadog-charslice-helper-usage
Mar 11, 2024
Merged

Update to use DDOG_CHARSLICE_C and new DDOG_CHARSLICE_C_BARE helpers#2565
bwoebi merged 2 commits intomasterfrom
ivoanjo/update-libdatadog-charslice-helper-usage

Conversation

@ivoanjo
Copy link
Copy Markdown
Member

@ivoanjo ivoanjo commented Mar 11, 2024

Description

What does this PR do?

This PR updated dd-trace-php to use the helpers that were changed/ introduced in DataDog/libdatadog#347 .

TL;DR: DDOG_CHARSLICE_C includes the cast to (ddog_CharSlice) to all uses of (ddog_CharSlice) DDOG_CHARSLICE_C in the codebase were converted to not have the cast; and DDOG_CHARSLICE_C_BARE does not have the cast, so all uses of DDOG_CHARSLICE_C without the cast in the codebase were converted to this one.

Motivation:

Update to match the latest libdatadog changes.

Additional Notes:

This is my first dd-trace-php contribution I think?

How to test the change?

I'm guessing CI should be able to validate this (?), not very familiar with our testing setup.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

**What does this PR do?**

This PR updated dd-trace-php to use the helpers that were changed/
introduced in DataDog/libdatadog#347 .

TL;DR: `DDOG_CHARSLICE_C` includes the cast to `(ddog_CharSlice)` to
all uses of `(ddog_CharSlice) DDOG_CHARSLICE_C` in the codebase were
converted to not have the cast; and `DDOG_CHARSLICE_C_BARE` does
not have the cast, so all uses of `DDOG_CHARSLICE_C` without the
cast in the codebase were converted to this one.

**Motivation:**

Update to match the latest libdatadog changes.

**Additional Notes:**

This is my first dd-trace-php contribution I think?

**How to test the change?**

I'm guessing CI should be able to validate this (?), not very
familiar with our testing setup.
@ivoanjo ivoanjo requested a review from a team as a code owner March 11, 2024 12:14
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 11, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.91%. Comparing base (d438927) to head (ac0a7cc).
⚠️ Report is 850 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2565      +/-   ##
============================================
- Coverage     77.07%   75.91%   -1.17%     
  Complexity     2563     2563              
============================================
  Files           215      241      +26     
  Lines         23048    27020    +3972     
  Branches          0      976     +976     
============================================
+ Hits          17765    20511    +2746     
- Misses         5283     5989     +706     
- Partials          0      520     +520     
Flag Coverage Δ
appsec-extension 69.13% <ø> (?)
tracer-extension 78.70% <100.00%> (ø)
tracer-php 75.06% <ø> (ø)

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

Files with missing lines Coverage Δ
ext/auto_flush.c 58.13% <ø> (ø)
ext/logging.c 72.72% <100.00%> (ø)
ext/sidecar.c 82.75% <100.00%> (ø)
ext/telemetry.c 100.00% <100.00%> (ø)

... and 26 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 d438927...ac0a7cc. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 11, 2024

Benchmarks

Benchmark execution time: 2024-03-11 15:54:15

Comparing candidate commit ac0a7cc in PR branch ivoanjo/update-libdatadog-charslice-helper-usage with baseline commit d438927 in branch master.

Found 2 performance improvements and 0 performance regressions! Performance is the same for 180 metrics, 0 unstable metrics.

scenario:PDOBench/benchPDOBaseline-opcache

  • 🟩 execution_time [-14.043µs; -11.699µs] or [-7.400%; -6.164%]

scenario:PDOBench/benchPDOOverheadWithDBM-opcache

  • 🟩 execution_time [-15.077µs; -10.081µs] or [-4.592%; -3.070%]

Copy link
Copy Markdown
Collaborator

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

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

Thanks, just updated libdatadog so that the cbindgen check doesn't fail :-)

@bwoebi bwoebi merged commit fc050ce into master Mar 11, 2024
@bwoebi bwoebi deleted the ivoanjo/update-libdatadog-charslice-helper-usage branch March 11, 2024 16:36
@github-actions github-actions Bot added this to the 0.99.0 milestone Mar 11, 2024
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