mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-13 22:10:25 +01:00
25 lines
488 B
Bash
25 lines
488 B
Bash
|
#!/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
|
||
|
|