Skip to content

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

Open
albfsg wants to merge 4 commits into
root-project:masterfrom
albfsg:flame_visualizer_backend
Open

[ntuple] Add schema profile visualizator backend supporting Speedscope#22641
albfsg wants to merge 4 commits 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 PrintFieldTreeAsFlamegraphSpecification(EFlamegraphSpecificationFormat 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?

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
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx
Comment thread tree/ntupleutil/src/RNTupleInspector.cxx
kUncompressedSize
};

enum class ESchemaProfileFormat {

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.

Thinking about it, this enum should probably be defined inside RNTupleInspector.

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