perf(term): add benchmarks

Adds benchmarks by running [alacritty/vtebench](https://github.com/alacritty/vtebench)
benchmarks in the terminal.
Uses code based on [godotengine/godot-benchmarks](https://github.com/godotengine/godot-benchmarks)
to measure average GPU and CPU time spent per frame.
Uses [github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark)
for continuous integration, and publishes benchmark results to https://lihop.github.io/godot-xterm/dev/bench/.
This commit is contained in:
Leroy Hopson 2024-06-09 17:18:58 +12:00 committed by Leroy Hopson
parent 8b33818751
commit 9569c9e489
10 changed files with 326 additions and 0 deletions

View file

@ -32,3 +32,12 @@ test-visual:
uninstall:
{{godot}} --headless -s plug.gd uninstall
bench name="":
@if [ "{{name}}" = "editor_launch" ]; then \
./benchmark/editor_launch.sh {{godot}}; \
elif [ -n "{{name}}" ]; then \
{{godot}} --windowed --resolution 800x600 --position 0,0 benchmark/benchmark.tscn -- --benchmark={{name}}; \
else \
ls -1 benchmark/vtebench/benchmarks | xargs -I {} just bench {} && just bench editor_launch; \
fi