Skip to content

Conversation

@caddoo
Copy link
Contributor

@caddoo caddoo commented Dec 18, 2025

Description

Integrates with this work #23902

Not every path is tested as the timer is tested in the other work.

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@caddoo caddoo force-pushed the dev-19750-timing-metrics branch from 7d18ad1 to dd9f1d2 Compare December 18, 2025 04:57
@caddoo caddoo marked this pull request as ready for review December 18, 2025 06:06
@caddoo caddoo force-pushed the dev-19750-timing-metrics branch from 887b7ba to f08ed6e Compare December 19, 2025 02:21
@caddoo caddoo requested a review from mneudert December 19, 2025 02:23
@caddoo caddoo added this to the 5.7.0 milestone Dec 19, 2025
@caddoo caddoo added the Needs Review PRs that need a code review label Dec 19, 2025
$segmentObj
);
if ($report) {
$parameters->setArchiveOnlyReport($report);
Copy link
Member

Choose a reason for hiding this comment

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

Is it relevant for the current metric gathering if a single report was requested? For example, when a new custom report is being archived?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've decided now to skip for individual reports, i've left the condition at this level, is that going to be confusing do you think, that there is a decision here and internally in the timer.

Copy link
Member

Choose a reason for hiding this comment

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

I did not mean to add any skip-check here, I would actually not. The event handler should take care of not doing work on anything it receives but does not want.

Phrasing my question differently:

Would it make sense to add $report to the event signature? It is part of the archiveReports signature, and dropping it feels like a rather arbitrary decision.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is now used and removed $shouldRecordMetrics

@github-actions
Copy link
Contributor

This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Dec 31, 2025
@caddoo caddoo requested a review from mneudert January 6, 2026 00:37
@github-actions github-actions bot removed the Stale The label used by the Close Stale Issues action label Jan 6, 2026
Copy link
Member

@mneudert mneudert left a comment

Choose a reason for hiding this comment

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

Merging into main PR. Will add any comments (e.g. for the broken CI parts) there.

@mneudert mneudert merged commit 2020ea1 into dev-19750-timing-metrics Jan 14, 2026
23 of 29 checks passed
@mneudert mneudert deleted the dev-19775 branch January 14, 2026 17:32
caddoo added a commit that referenced this pull request Jan 16, 2026
* Integrate archiveReports with ArchiveMetrics timer

* Create event and hook timer into it

* Add better typing

* Make sure plugin is loaded for integration test

* Skip metrics for single-report archiving

* Add test-only timer reset helper

* Simplify archive loader test GET handling

* Add nullable type for instance

* cs fix

* Add strict types

* Allow reports to have metrics recorded
mneudert pushed a commit that referenced this pull request Jan 16, 2026
* Integrate archiveReports with ArchiveMetrics timer

* Create event and hook timer into it

* Add better typing

* Make sure plugin is loaded for integration test

* Skip metrics for single-report archiving

* Add test-only timer reset helper

* Simplify archive loader test GET handling

* Add nullable type for instance

* cs fix

* Add strict types

* Allow reports to have metrics recorded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review PRs that need a code review

Development

Successfully merging this pull request may close these issues.

3 participants