Skip to content

feat: add memory usage in PHPUnit telemetry data#2403

Merged
norberttech merged 1 commit into
flow-php:1.xfrom
jdecool:1.x-feat-memory-usage
May 30, 2026
Merged

feat: add memory usage in PHPUnit telemetry data#2403
norberttech merged 1 commit into
flow-php:1.xfrom
jdecool:1.x-feat-memory-usage

Conversation

@jdecool
Copy link
Copy Markdown
Contributor

@jdecool jdecool commented May 30, 2026

Change Log


Added

  • Add memory usage consumption in PHPUnit OpenTelemetry bridge

Fixed

Changed

Removed

Deprecated

Security

@jdecool jdecool requested a review from norberttech as a code owner May 30, 2026 12:14
@jdecool jdecool force-pushed the 1.x-feat-memory-usage branch from ffce563 to ae3ee13 Compare May 30, 2026 12:28
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

❌ Patch coverage is 92.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.82%. Comparing base (b973a74) to head (8799c23).
⚠️ Report is 5 commits behind head on 1.x.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##                1.x    #2403   +/-   ##
=========================================
  Coverage     84.81%   84.82%           
- Complexity    20456    20465    +9     
=========================================
  Files          1556     1557    +1     
  Lines         62813    62848   +35     
=========================================
+ Hits          53273    53308   +35     
  Misses         9540     9540           
Components Coverage Δ
etl 89.34% <ø> (-0.01%) ⬇️
cli 89.40% <ø> (ø)
lib-array-dot 81.44% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 93.61% <ø> (ø)
lib-filesystem 85.03% <ø> (ø)
lib-types 91.98% <ø> (ø)
lib-parquet 68.89% <ø> (ø)
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 90.26% <ø> (ø)
lib-dremel 0.00% <ø> (ø)
lib-postgresql 88.39% <100.00%> (ø)
lib-telemetry 84.31% <ø> (ø)
bridge-filesystem-async-aws 92.74% <ø> (ø)
bridge-filesystem-azure 90.45% <ø> (ø)
bridge-monolog-http 97.86% <ø> (ø)
bridge-monolog-telemetry 94.11% <ø> (ø)
bridge-openapi-specification 92.07% <ø> (ø)
symfony-http-foundation 78.57% <ø> (ø)
bridge-psr18-telemetry 100.00% <ø> (ø)
bridge-psr3-telemetry 97.84% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.50% <ø> (ø)
bridge-symfony-http-foundation-telemetry 89.47% <ø> (ø)
bridge-symfony-filesystem-bundle 91.54% <ø> (ø)
bridge-symfony-filesystem-cache 98.14% <ø> (ø)
bridge-symfony-postgresql-bundle 94.53% <ø> (ø)
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 76.00% <ø> (ø)
adapter-chartjs 84.05% <ø> (ø)
adapter-csv 91.16% <ø> (ø)
adapter-doctrine 90.79% <ø> (ø)
adapter-elasticsearch 92.07% <ø> (ø)
adapter-google-sheet 99.18% <ø> (ø)
adapter-http 73.04% <ø> (ø)
adapter-json 88.63% <ø> (ø)
adapter-logger 50.00% <ø> (ø)
adapter-parquet 81.75% <ø> (ø)
adapter-text 74.13% <ø> (ø)
adapter-xml 83.40% <ø> (ø)
adapter-avro 0.00% <ø> (ø)
adapter-excel 94.21% <ø> (ø)
adapter-postgresql 90.52% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 80.09% <92.50%> (+1.31%) ⬆️
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jdecool jdecool force-pushed the 1.x-feat-memory-usage branch from ae3ee13 to 79269d5 Compare May 30, 2026 12:36
try {
if ($this->config->emitTestSpans || $this->config->emitMetrics) {
memory_reset_peak_usage();
$this->memoryRegistry->setStart($event->test()->id(), memory_get_usage());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we should not parametrize it and allow users to decide if they want to pass bool $real_usage argument.

@jdecool jdecool force-pushed the 1.x-feat-memory-usage branch from 79269d5 to 8799c23 Compare May 30, 2026 13:43
<parameter name="emit_metrics" value="true"/>
<parameter name="emit_test_spans" value="true"/>
<parameter name="emit_test_case_spans" value="true"/>
<parameter name="memory_real_usage" value="false"/>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

False because it's the default PHP behaviour

@norberttech norberttech merged commit 77922e5 into flow-php:1.x May 30, 2026
30 checks passed
@jdecool jdecool deleted the 1.x-feat-memory-usage branch May 30, 2026 18:55
@jdecool
Copy link
Copy Markdown
Contributor Author

jdecool commented May 30, 2026

Thanks @norberttech

@norberttech
Copy link
Copy Markdown
Member

Thank you @jdecool 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants