1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 17:42:29 +01:00

Updated Benchmarking & stress testing OpenRCT2 (markdown)

Michał Janiszewski
2019-01-22 21:44:23 +01:00
parent 3f3771ded9
commit ddd9d44457

@@ -1,3 +1,29 @@
## Google Benchmark
With https://github.com/OpenRCT2/OpenRCT2/pull/8458 there is support for Google Benchmark library. The initial benchmark implemented measures performance of sprite sorting algorithm. You should be able to use all of the library's options:
```
[--benchmark_list_tests={true|false}]
[--benchmark_filter=<regex>]
[--benchmark_min_time=<min_time>]
[--benchmark_repetitions=<num_repetitions>]
[--benchmark_report_aggregates_only={true|false}]
[--benchmark_format=<console|json|csv>]
[--benchmark_out=<filename>]
[--benchmark_out_format=<json|console|csv>]
[--benchmark_color={auto|true|false}]
[--benchmark_counters_tabular={true|false}]
[--v=<verbosity>]
```
You're welcome to experiment with code to improve it and add more benchmarks.
### `benchspritesort`
This is a benchmark measuring performance of sprite sorting algorithm.
To use, invoke `./openrct2 benchspritesort [save.sv6]...`.
## `benchgfx`
To benchmark park rendering, run `openrct2 benchgfx path/to/file.sv6 [optional iteration count]`. By default 40 iterations are performed, but you can change this by passing a third parameter (e.g. `openrct2 benchgfx save.sv6 100` would run 100 iterations).
We provide a test park containing every ride type in the tests folder - `test/tests/testdata/parks/bpb.sv6` ([link](https://github.com/OpenRCT2/OpenRCT2/blob/develop/test/tests/testdata/parks/bpb.sv6)). It's based on Blackpool Pleasure Beach from RCT1.