Skip to content

[ntuple] Provide a common set of performance counters in RPage{Sink,Source}#8397

Merged
jalopezg-git merged 3 commits intoroot-project:masterfrom
jalopezg-git:ntuple-rpagestorage-basemetrics
Jun 12, 2021
Merged

[ntuple] Provide a common set of performance counters in RPage{Sink,Source}#8397
jalopezg-git merged 3 commits intoroot-project:masterfrom
jalopezg-git:ntuple-rpagestorage-basemetrics

Conversation

@jalopezg-git
Copy link
Copy Markdown
Contributor

This pull-request extends RPageSink and RPageSource to provide a common set of performance counters that can be enabled in a subclass via EnableDefaultMetrics(). Afterward, the set might be extended in a subclass via a call to fMetrics.MakeCounter<...>().

This not only removes boilerplate code from subclasses, but also provides a useful set of regular/computed counters. A subclass, however, is still responsible for updating the base counters.

Alternatively, subclasses may still ignore the default set of metrics and provide their own RNTupleMetrics object by overriding the GetMetrics() member function.

Closes issue #8360.

@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-06-10T13:19:34.809Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/ntuple/v7/src/RPageStorage.cxx:138:15: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
  • [2021-06-10T13:19:34.809Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/ntuple/v7/src/RPageStorage.cxx:397:15: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]

Copy link
Copy Markdown
Contributor

@mxxo mxxo left a comment

Choose a reason for hiding this comment

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

Hey Javier I think everything looks pretty good! You could also take the prefix argument out of EnableDefaultMetrics and pass it in the initializer list: fMetrics("RPageSinkFile") to match what would happen if a derived class doesn't call EnableDefaultMetrics but this is not a big deal.

Thanks! It's up to Jakob to decide that, but I would prefer leaving as-is, i.e. everything is taken care of in the call to EnableDefaultMetrics().

Copy link
Copy Markdown
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

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

Great, many thanks! Just two tiny suggestions for the comments.

This function searches the RNTupleMetrics instance on which it is called only,
i.e. it is the 'get' counterpart of the `Contains()` function.

It can be used by a callable fed into a `RNTupleCalcPerf` instance to query
sibling counters.
@jalopezg-git jalopezg-git force-pushed the ntuple-rpagestorage-basemetrics branch from 8986cb0 to 8e0350e Compare June 11, 2021 10:17
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

1 similar comment
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

…PageSource

These counters can be enabled in a subclass by calling `EnableDefaultMetrics()`.
This set can be extended later via `fMetrics.MakeCounter<>()`. Alternatively,
a subclass might provide its own default metrics object by overriding the
`GetMetrics` member function
@jalopezg-git jalopezg-git force-pushed the ntuple-rpagestorage-basemetrics branch from a80bca0 to e9c844b Compare June 11, 2021 11:34
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@jalopezg-git jalopezg-git requested a review from jblomer June 11, 2021 12:00
@jalopezg-git jalopezg-git merged commit b58bc62 into root-project:master Jun 12, 2021
@jalopezg-git jalopezg-git deleted the ntuple-rpagestorage-basemetrics branch June 12, 2021 15:23
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.

[ntuple] Move common performance counters to RPage{Sink,Source} base class

4 participants