mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-24 18:20:25 +01:00
9569c9e489
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/.
24 lines
488 B
Bash
Executable file
24 lines
488 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
godot=${1:-godot}
|
|
|
|
if ! command -v $godot &> /dev/null; then
|
|
echo "Error: '$godot' command not found. Please provide a valid path to the Godot executable."
|
|
exit 1
|
|
fi
|
|
|
|
results_file=benchmark/results/editor_launch.json
|
|
value=$({ time -p $godot --editor --quit; } 2>&1 | tail -n3 | head -n1 | cut -d' ' -f2)
|
|
cat <<EOF > $results_file
|
|
[
|
|
{
|
|
"name": "editor_launch",
|
|
"unit": "seconds",
|
|
"value": $value
|
|
}
|
|
]
|
|
EOF
|
|
cat $results_file
|
|
|