Skip to content

[ntuple] Add schema profile visualizator backend supporting Speedscope#22641

Open
albfsg wants to merge 1 commit into
root-project:masterfrom
albfsg:flame_visualizer_backend
Open

[ntuple] Add schema profile visualizator backend supporting Speedscope#22641
albfsg wants to merge 1 commit into
root-project:masterfrom
albfsg:flame_visualizer_backend

Conversation

@albfsg

@albfsg albfsg commented Jun 17, 2026

Copy link
Copy Markdown

This Pull request:

Changes:

This PR adds void PrintSchemaProfile(ESchemaProfileFormat format, std::ostream &output = std::cout) const; method to the RNTupleInspector class.

It also adds a trivial unit test to the ntuple_inspector.cxx file which locally works.

Checklist:

  • tested changes locally on tests whose name match ntuple and on the ntuple_inspector file tests.
  • updated the docs (if necessary) <- no need to update the docs I believe.

@albfsg albfsg force-pushed the flame_visualizer_backend branch from 22e1cd4 to 42fcc76 Compare June 17, 2026 12:01
@albfsg

albfsg commented Jun 17, 2026

Copy link
Copy Markdown
Author

Images of how Speedscope renders the output of the method as a left-heavy view and a sandwich view:

image image

@albfsg

albfsg commented Jun 17, 2026

Copy link
Copy Markdown
Author

Images of how Speedscope renders the output of the method for the test ntuple as a left-heavy view and a sandwich view:

image image

@silverweed silverweed self-assigned this Jun 17, 2026

@silverweed silverweed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you! This is already in a very good state, I mostly have minor comments about it.

Comment thread tree/ntupleutil/inc/ROOT/RNTupleInspector.hxx
Comment thread tree/ntupleutil/inc/ROOT/RNTupleInspector.hxx Outdated
///
/// \param[in] format The output format for the flamegraph specification (right now only supports Speedscope's JSON)
///
void PrintFieldTreeAsFlamegraphSpecification(EFlamegraphSpecificationFormat format,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm unsure whether to call it "Flamegraph", as it's more of a profile viewer...we might want to just name this method something like PrintSchemaAsProfile / PrintSchemaProfile.
@jblomer any suggestion?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have no strong opinion on either of the two terms.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I've updated the signature to PrintSchemaProfile.

Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/test/ntuple_inspector.cxx Outdated
Comment thread tree/ntupleutil/test/ntuple_inspector.cxx Outdated
@jblomer

jblomer commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Replaces #4634

@albfsg albfsg changed the title [ntuple] Add flamegraph visualizator backend supporting Speedscope [ntuple] Add schema profile visualizator backend supporting Speedscope Jun 18, 2026
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx Outdated
Comment thread tree/ntupleutil/inc/ROOT/RNTupleInspector.hxx
@silverweed

Copy link
Copy Markdown
Contributor

@albfsg did you forget to push? I see you resolved several comments but they are still unaddressed in this PR

@albfsg

albfsg commented Jun 19, 2026

Copy link
Copy Markdown
Author

@albfsg did you forget to push? I see you resolved several comments but they are still unaddressed in this PR

I didn't forget. I resolved them locally and just haven't pushed it yet because I have a few doubts I'd like to discuss in person before pushing the changes. Although I see why it's confusing to close them before actually pushing anything.

@silverweed

Copy link
Copy Markdown
Contributor

@albfsg did you forget to push? I see you resolved several comments but they are still unaddressed in this PR

I didn't forget. I resolved them locally and just haven't pushed it yet because I have a few doubts I'd like to discuss in person before pushing the changes. Although I see why it's confusing to close them before actually pushing anything.

I see. I recommend resolving the comments only after pushing the changes (if you want to mark them for your own local usage you can e.g. thumb-up them)

@albfsg

albfsg commented Jun 19, 2026

Copy link
Copy Markdown
Author

@albfsg did you forget to push? I see you resolved several comments but they are still unaddressed in this PR

I didn't forget. I resolved them locally and just haven't pushed it yet because I have a few doubts I'd like to discuss in person before pushing the changes. Although I see why it's confusing to close them before actually pushing anything.

I see. I recommend resolving the comments only after pushing the changes (if you want to mark them for your own local usage you can e.g. thumb-up them)

OK Thanks!

Produces an output readable by performance profile viewers, as of this
commit just Speedscope, to visualize the fields of an ntuple and the
columns below them.

Comes with a unit test in ntuple_inspector.
@albfsg albfsg force-pushed the flame_visualizer_backend branch from 6dafd69 to b36b343 Compare June 19, 2026 15:33
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