Skip to content

Conversation

@harp-intel
Copy link
Contributor

Summary

This PR extracts the benchmark functionality from the report command into a new standalone benchmark command, providing a cleaner separation of concerns and improved user experience.

Changes

New Benchmark Command (cmd/benchmark/)

  • Command structure: Follows the same flag pattern as the telemetry command
  • Flags: Individual flags for each benchmark type (--speed, --power, --temperature, --frequency, --memory, --numa, --storage)
  • Default behavior: Runs all benchmarks with --all (default: true)
  • System summary: Includes Brief System Summary table by default (can be excluded with --no-summary)

Files created:

  • cmd/benchmark/benchmark.go - Main command implementation
  • cmd/benchmark/benchmark_tables.go - Table definitions and data processing
  • cmd/benchmark/benchmark_renderers.go - HTML rendering functions
  • cmd/benchmark/benchmarking.go - Helper functions

Updated Report Command

  • Removed --benchmark flag
  • Removed benchmark table definitions
  • Removed benchmark data processing functions
  • Cleaned up unused imports

Files modified:

  • cmd/report/report.go
  • cmd/report/report_tables.go

Other Changes

  • Registered benchmark command in cmd/root.go
  • Updated README.md with new Benchmark Command section
  • Updated .github/copilot-instructions.md to include benchmark command

Usage

# Run all benchmarks (default)
perfspect benchmark

# Run specific benchmarks
perfspect benchmark --speed --power

# Exclude system summary
perfspect benchmark --no-summary

# Benchmark remote target
perfspect benchmark --target 192.168.1.1 --user user --key key_file

Testing

  • Code compiles successfully
  • Benchmark command appears in main help
  • Benchmark command help displays correctly
  • Report command no longer has benchmark flags
  • All flags follow telemetry command pattern
  • System summary included by default

Breaking Changes

⚠️ Breaking change: Users currently using perfspect report --benchmark will need to migrate to perfspect benchmark.

Benefits

  • Clearer separation between configuration reporting and performance benchmarking
  • Consistent flag pattern across commands (matches telemetry)
  • More discoverable - benchmarks are now a top-level command
  • Includes system context with Brief System Summary table

harp-intel and others added 17 commits December 15, 2025 03:25
- Create new 'benchmark' command under cmd/benchmark/
- Implement benchmark flags following telemetry command pattern:
  * --all (default) - run all benchmarks
  * --speed, --power, --temperature, --frequency, --memory, --numa, --storage
- Move benchmark table definitions and processing functions to new command
- Move benchmark HTML renderers to new command
- Remove benchmark functionality from report command:
  * Remove --benchmark flag
  * Remove benchmark table definitions
  * Remove benchmark data processing functions
  * Clean up unused imports
- Register benchmark command in root command

The benchmark command now provides a cleaner separation of concerns,
following the same flag pattern as the telemetry command.

Usage:
  perfspect benchmark                    # Runs all benchmarks
  perfspect benchmark --speed --power    # Runs specific benchmarks
  perfspect benchmark --target <ip>      # Benchmark remote target
- Add --no-summary flag to optionally exclude system summary
- Include Brief System Summary table by default (like telemetry command)
- System summary provides quick overview of target system configuration
- Follows same pattern as telemetry command for consistency

The system summary table shows key system information including:
- Host name, time, CPU model, microarchitecture, TDP
- Sockets, cores, hyperthreading, CPUs, NUMA nodes
- Scaling driver/governor, C-states, frequencies
- Energy settings, memory, NIC, disk, OS, kernel
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
- Add benchmark command to commands table in README.md
- Create new Benchmark Command section with detailed descriptions
- Remove benchmark subsection from Report Command documentation
- Update copilot-instructions.md to include benchmark command
- Document --no-summary flag for excluding system summary

The benchmark command is now properly documented as a standalone
command rather than a flag within the report command.
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
* rename flame command to flamegraph, accept flame as alias

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>

* clean up short descriptions

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>

---------

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
- Create new 'benchmark' command under cmd/benchmark/
- Implement benchmark flags following telemetry command pattern:
  * --all (default) - run all benchmarks
  * --speed, --power, --temperature, --frequency, --memory, --numa, --storage
- Move benchmark table definitions and processing functions to new command
- Move benchmark HTML renderers to new command
- Remove benchmark functionality from report command:
  * Remove --benchmark flag
  * Remove benchmark table definitions
  * Remove benchmark data processing functions
  * Clean up unused imports
- Register benchmark command in root command

The benchmark command now provides a cleaner separation of concerns,
following the same flag pattern as the telemetry command.

Usage:
  perfspect benchmark                    # Runs all benchmarks
  perfspect benchmark --speed --power    # Runs specific benchmarks
  perfspect benchmark --target <ip>      # Benchmark remote target
- Add --no-summary flag to optionally exclude system summary
- Include Brief System Summary table by default (like telemetry command)
- System summary provides quick overview of target system configuration
- Follows same pattern as telemetry command for consistency

The system summary table shows key system information including:
- Host name, time, CPU model, microarchitecture, TDP
- Sockets, cores, hyperthreading, CPUs, NUMA nodes
- Scaling driver/governor, C-states, frequencies
- Energy settings, memory, NIC, disk, OS, kernel
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
- Add benchmark command to commands table in README.md
- Create new Benchmark Command section with detailed descriptions
- Remove benchmark subsection from Report Command documentation
- Update copilot-instructions.md to include benchmark command
- Document --no-summary flag for excluding system summary

The benchmark command is now properly documented as a standalone
command rather than a flag within the report command.
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
…sk space requirements

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
… output parsing

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
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.

2 participants