Skip to content

[ntuple] Allow enabling RNTupleMetrics through env variable - #23038

Open
albfsg wants to merge 2 commits into
root-project:masterfrom
albfsg:metrics_expansion
Open

[ntuple] Allow enabling RNTupleMetrics through env variable#23038
albfsg wants to merge 2 commits into
root-project:masterfrom
albfsg:metrics_expansion

Conversation

@albfsg

@albfsg albfsg commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This Pull request:

Changes or fixes: <- Changes

  • Activate metrics automatically by setting environmental variable ROOT_EXPORT_RNTUPLE_METRICS.
  • Auto-enable counters on creation if metrics are enabled.
  • Added an integration test for ROOT_EXPORT_RNTUPLE_METRICS and updated the counters unit tests.

It's a first step towards improving the usability of the RNTupleMetrics class.

Checklist:

  • tested changes locally
  • updated the docs (if necessary) <- Documented env variable ROOT_EXPORT_RNTUPLE_METRICS in the header of the RNTupleMetrics class

This PR fixes # <- Nothing

Comment thread roottest/root/ntuple/metrics/CMakeLists.txt
Comment thread tree/ntuple/inc/ROOT/RNTupleMetrics.hxx
Comment thread roottest/root/ntuple/metrics/metrics_env.C Outdated
Comment thread roottest/root/ntuple/metrics/metrics_env.C Outdated
@silverweed

Copy link
Copy Markdown
Contributor

Please rename the PR to something a bit more specific like [ntuple] Allow enabling RNTupleMetrics through env variable

Comment thread tree/ntuple/inc/ROOT/RNTupleMetrics.hxx Outdated
@albfsg albfsg changed the title Expand metrics [ntuple] Allow enabling RNTupleMetrics through env variable Aug 7, 2026
@albfsg
albfsg force-pushed the metrics_expansion branch from 5640691 to 4814af8 Compare August 7, 2026 07:44
@albfsg
albfsg force-pushed the metrics_expansion branch 2 times, most recently from 0b6924f to 7373c8b Compare August 7, 2026 12:25
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 17h 36m 26s ⏱️
 3 859 tests  3 858 ✅ 0 💤 1 ❌
79 509 runs  79 498 ✅ 9 💤 2 ❌

For more details on these failures, see this check.

Results for commit 6b687ea.

♻️ This comment has been updated with latest results.

In this commit, `ROOT_EXPORT_RNTUPLE_METRICS` is an optional environment
variable that if set enables the metrics, but does not trigger metric
storage after the program ends.

In a future commit, we will expect the optional environment variable
`ROOT_EXPORT_RNTUPLE_METRICS` to be set to a path. If done, metrics will be
enabled and RNTupleMetrics will store the metrics there as a `.root`
file.
@albfsg
albfsg force-pushed the metrics_expansion branch from 7373c8b to 6b687ea Compare August 10, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants