Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.28 KB

File metadata and controls

51 lines (32 loc) · 1.28 KB

Benchmarking

Note: The provided benchmarker.py module is ONLY compatible with Windows based platforms.

These benchmarks are designed to stress-test the engine and measure its performance across various scenarios. Each benchmark targets a specific subsystem of the engine. The results of each benchmark can found in the corresponding benchmark folder.

Setup

The only requirement is installing the benchmarking dependencies:

pip install .[benchmarking]

Running a Benchmark

  1. Run a benchmark:
python -m benchmarks.<name>
  1. View the outputs in:
benchmarks/<name>

Creating Custom Benchmarks

A benchmarker.py module is provided to create custom benchmarks. Here’s how to use it:

  1. Import the benchmarker module:
import benchmarks.benchmarker as benchmarker

Important: You must import the benchmarker before importing extro.

  1. Start tracking by calling benchmarker.start_tracking() with the desired output path and benchmark duration:
benchmarker.start_tracking("./path/to/benchmark", duration)  # duration in seconds
  1. Import and run your project as usual. The benchmarker will automatically stop after the specified duration, generate a report, and exit the engine:
import extro