Feature request: benchmark mode
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 658
- Forks
- 48
- Avg merge
- 8h 33m
- Merged PRs (30d)
- 5
Description
Summary
Add a headless "benchmark" mode to the emulator, allowing it to execute a given DOS program as fast as possible without UI rendering, while collecting performance metrics. This will enable easier performance testing, regression detection, and optimization validation.
Use Case & Motivation
- Measure execution speed under different configurations (e.g., changes in CPU emulation, memory management, or instruction handling).
- Detect performance regressions when modifying the emulator.
- Compare execution time across different versions of the emulator.
- Automate benchmarking for continuous performance tracking.
Proposed Implementation
-
Command-Line Mode:
- Introduce a CLI flag (e.g.,
--benchmark <path_to_executable>) to launch the emulator in benchmark mode. - Optionally allow specifying parameters such as:
--max-instructions <N>to limit execution.--timeout <seconds>to prevent infinite loops.
- Introduce a CLI flag (e.g.,
-
Performance Metrics Collection:
- Measure total execution time.
- Count executed instructions.
- Track cycle counts and key statistics (e.g., opcode distribution, memory access patterns).
- Optionally output a JSON or CSV report (
--output <file>).
-
Exit Conditions:
- Program terminates normally.
- Reaches a configured instruction/time limit.
- Encounters an unsupported instruction or exception.
Optional Enhancements (Future Work)
- Support deterministic replays for comparing different versions.
- Profiling integration (e.g., detailed breakdown of CPU/memory usage).
- Compare multiple emulator builds automatically and report differences.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are identified. Start by locating the command-line startup path and emulator execution loop, then define the smallest benchmark slice before adding limits and metrics. Done should include headless execution, documented exit conditions, and a machine-readable performance report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli, performance, reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100