Skip to content

Adds benchmark summary backend - #4603

Merged
kellyguo11 merged 21 commits into
isaac-sim:developfrom
preeves-nv:dev/preeves/benchmarking_summaries
Mar 4, 2026
Merged

kellyguo11 merged 21 commits into
isaac-sim:developfrom
preeves-nv:dev/preeves/benchmarking_summaries

Conversation

@preeves-nv

@preeves-nv preeves-nv commented Feb 12, 2026 •

Copy link
Copy Markdown
Contributor

Description
Builds on the new benchmarking framework from #4550 by adding a human-readable summary backend and wiring it into existing benchmark scripts.

Key additions:
SummaryMetrics backend that prints a structured console summary and still writes JSON
CLI summary backend support across benchmark scripts
Frametime recorder fallback for Isaac Sim packaging variants (bundled frametime module)
Runtime stats unit fix (FPS vs ms) and num_cpus in summary header
Updated:
Benchmark scripts to enable frametime recorders only when summary is selected

Bug fix: Runtime stats were previously logged with unit "ms" for every metric, so FPS metrics (e.g. Collection FPS, Total FPS) were mislabelled. The fix infers the unit from the metric key name (FPS vs time) so the summary shows correct units. Location: scripts/benchmarks/utils.py, log_min_max_mean_stats.

Type of change
New feature (non-breaking change which adds functionality)
Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Feb 12, 2026
@preeves-nv preeves-nv changed the title Add benchmark summary backend and frametime recorder fallback Add benchmark summary backend Feb 12, 2026
@greptile-apps

greptile-apps Bot commented Feb 12, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Added SummaryMetrics backend that prints structured console summaries while still writing JSON output. The implementation includes proper unit inference for runtime metrics (FPS vs ms), frametime recorder fallback for different Isaac Sim packaging variants, and integration across all benchmark scripts with conditional frametime recorder enablement.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-structured, non-breaking, and address a specific bug fix. The new SummaryMetrics backend is cleanly implemented with proper delegation to JSON backend. Previous formatting issues have been fixed. All benchmark scripts follow consistent patterns for backend selection and frametime recorder enablement.
  • No files require special attention

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/test/benchmark/backends.py Added SummaryMetrics backend class (~240 lines) with human-readable console output and JSON export. Formatting issues with trailing spaces have been fixed.
source/isaaclab/isaaclab/test/benchmark/benchmark_core.py Added try-except fallback for Isaac Sim packaging variants that bundle frametime recorders differently.
scripts/benchmarks/utils.py Fixed unit inference bug in log_min_max_mean_stats - now correctly uses FPS/ms based on metric name instead of hardcoding "ms".
scripts/benchmarks/benchmark_non_rl.py Added "summary" backend option and enabled frametime recorders only when summary backend is selected.
scripts/benchmarks/benchmark_rlgames.py Added "summary" backend option and enabled frametime recorders only when summary backend is selected.
scripts/benchmarks/benchmark_rsl_rl.py Added "summary" backend option and enabled frametime recorders only when summary backend is selected.

Flowchart

flowchart TD
    A[Benchmark Script] -->|"backend_type = 'summary'"| B[BaseIsaacLabBenchmark]
    B -->|Initialize| C[MetricsBackend.from_string]
    C -->|Create| D[SummaryMetrics]
    D -->|Delegates to| E[JSONFileMetrics]
    
    B -->|frametime_recorders=True| F{Try Import Frametime Recorders}
    F -->|Success| G[Individual Recorders]
    F -->|ImportError| H[IsaacFrameTimeRecorder Fallback]
    
    G --> I[PhysicsFrametime]
    G --> J[RenderFrametime]
    G --> K[AppFrametime]
    G --> L[GPUFrametime]
    
    B -->|add_measurement| D
    D -->|Store| M[_phases list]
    D -->|Store| E
    
    B -->|finalize| D
    D -->|_merge_phases| N[Merged TestPhase Dict]
    N --> O[_print_summary]
    O --> P[Console Output]
    D --> E
    E --> Q[JSON File Output]
    
    R[utils.log_min_max_mean_stats] -->|"unit = 'FPS' or 'ms'"| B
    
    style D fill:#90EE90
    style E fill:#FFD700
    style O fill:#87CEEB
    style R fill:#FFA07A
Loading

Last reviewed commit: 742d72d

@greptile-apps greptile-apps Bot 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.

8 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps

greptile-apps Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor
Additional Comments (1)

scripts/benchmarks/benchmark_non_rl.py
Inconsistent with other benchmark scripts. Should conditionally enable frametime recorders based on backend type like in benchmark_cameras.py, benchmark_rlgames.py, etc.

    frametime_recorders=get_backend_type(args_cli.benchmark_backend) == "summary",

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@preeves-nv
preeves-nv marked this pull request as draft February 12, 2026 16:27
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Feb 12, 2026
@preeves-nv

Copy link
Copy Markdown
Contributor Author

@greptile-apps - reply if you receive this message:
These should be fixed:

  • Minor formatting issue in SummaryMetrics where empty unit strings create trailing spaces in output
  • Inconsistency in benchmark_non_rl.py which hardcodes frametime_recorders=True instead of conditionally enabling it based on backend type like other scripts

Please rescan

@greptile-apps

greptile-apps Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Both issues have been fixed:

  1. SummaryMetrics formatting: The code now properly strips empty unit strings before adding them to output:

    • Line 259: unit_str = f" {measurement.unit.strip()}" if (measurement.unit and measurement.unit.strip()) else ""
    • Line 262: unit_str = f" {measurement.unit.strip()}" if (measurement.unit and measurement.unit.strip()) else ""
    • Line 330: unit = (raw_unit or "").strip() if isinstance(raw_unit, str) else ""
  2. benchmark_non_rl.py frametime_recorders: Now conditionally enables frametime recorders based on backend type, matching other scripts:

    • Line 101: backend_type = get_backend_type(args_cli.benchmark_backend)
    • Line 106: frametime_recorders=backend_type == "summary",
    • The hardcoded frametime_recorders=True has been removed

Both fixes are present in the current commit.

@preeves-nv

Copy link
Copy Markdown
Contributor Author

Greptile Overview

@greptile-apps - can you please update the
Greptile Overview #4603 (comment)
to reflect teh current code stae?

@greptile-apps greptile-apps Bot 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.

11 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks good! I have few minor comments but otherwise that's great. Is there any reasons why it's still in draft mode?

@preeves-nv
preeves-nv marked this pull request as ready for review February 17, 2026 15:22

@greptile-apps greptile-apps Bot 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.

11 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Comment thread scripts/benchmarks/benchmark_non_rl.py Outdated
output_path=args_cli.output_path,
use_recorders=True,
frametime_recorders=backend_type == "summary",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
frametime_recorders=backend_type == "summary",
frametime_recorders=backend_type == "summary", "omniperf"),

Right now Omniperf CI runs with the "omniperf" backend, and our Grafana dashboards rely on those frametime metrics. Just want to make sure we don’t unintentionally drop them.

Comment thread scripts/benchmarks/benchmark_rlgames.py Outdated
output_path=args_cli.output_path,
use_recorders=True,
frametime_recorders=backend_type == "summary",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
frametime_recorders=backend_type == "summary",
frametime_recorders=backend_type == "summary", "omniperf"),

Comment thread scripts/benchmarks/benchmark_rsl_rl.py Outdated
output_path=args_cli.output_path,
use_recorders=True,
frametime_recorders=backend_type == "summary",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
frametime_recorders=backend_type == "summary",
frametime_recorders=backend_type == "summary", "omniperf"),

output_path=args_cli.output_path,
use_recorders=True,
frametime_recorders=backend_type == "summary",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
frametime_recorders=backend_type == "summary",
frametime_recorders=backend_type == "summary", "omniperf"),

Comment thread scripts/benchmarks/benchmark_cameras.py Outdated
output_path=args_cli.output_path,
use_recorders=True,
frametime_recorders=backend_type == "summary",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
frametime_recorders=backend_type == "summary",
frametime_recorders=backend_type == "summary", "omniperf"),

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.

why do we enable frametime_recorders only if backend_type is summary? seems like in the previous behavior, this was always true?

Comment thread source/isaaclab/docs/CHANGELOG.rst Outdated
@@ -37,6 +37,19 @@ Added
* Added shared warp math kernels in :mod:`isaaclab.utils.warp.kernels` for quaternion
operations, coordinate transforms, and velocity computations.

* Added :class:`~isaaclab.test.benchmark.backends.SummaryMetrics` backend for benchmarks:

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.

can you add this as a new entry in the changelog with corresponding version update change? the version would also need to be updated in extension.toml

Comment thread scripts/benchmarks/benchmark_cameras.py Outdated
output_path=args_cli.output_path,
use_recorders=True,
frametime_recorders=backend_type == "summary",

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.

why do we enable frametime_recorders only if backend_type is summary? seems like in the previous behavior, this was always true?

from isaacsim.benchmark.services.datarecorders.render_frametime import RenderFrametimeRecorder

self._frametime_recorders["PhysicsFrametime"] = PhysicsFrametimeRecorder()
self._frametime_recorders["RenderFrametime"] = RenderFrametimeRecorder()

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.

This is something we discussed in our meeting. On develop we currently have:

  1. kit-full physics, kit-full rendering
  2. kit-full physics, kit-less rendering

Right now you assume that everything is kit-full or kit-less, I think we should revisit this logic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure - I must have missed that - will revisit.

preeves-nv and others added 2 commits February 26, 2026 10:08
Print a structured summary alongside JSON output using existing measurements
and metadata, including runtime aggregates, startup timings, and system info.

Co-authored-by: Cursor <[email protected]>
Add the summary backend to CLI choices and enable frametime recorders when
summary output is requested.

Co-authored-by: Cursor <[email protected]>
preeves-nv and others added 16 commits February 26, 2026 10:08
Add summary to backend mapping and infer FPS vs time units when emitting
min/mean/max runtime measurements.

Co-authored-by: Cursor <[email protected]>
This keeps frametime collection working across Isaac Sim packaging variants.

Co-authored-by: Cursor <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: preeves-nv <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: preeves-nv <[email protected]>
@preeves-nv
preeves-nv force-pushed the dev/preeves/benchmarking_summaries branch from f64985d to 02c44c4 Compare February 26, 2026 10:23
@kellyguo11 kellyguo11 changed the title Add benchmark summary backend Adds benchmark summary backend Mar 3, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor

@AntoineRichard could you pls approve the PR if the changes look good to you?

@kellyguo11
kellyguo11 merged commit e9d1709 into isaac-sim:develop Mar 4, 2026
6 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants