summaryrefslogtreecommitdiff
path: root/scripts/perf
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-23 17:24:16 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-23 17:24:16 -0400
commit74badfcfb07733214cbe5aa5ae02bd413f8465a2 (patch)
treef1dabff03453d87a78257d872acddb8f86f4da9c /scripts/perf
parente290d14f65946600939321d2471ce9d4b2508e3e (diff)
parent9289b96de48e0a3f57819ca173c5d5d51ad25c56 (diff)
Merge remote 'release/luau-scripting' into release/luau-scripting
Diffstat (limited to 'scripts/perf')
-rwxr-xr-xscripts/perf/frame_profile35
1 files changed, 34 insertions, 1 deletions
diff --git a/scripts/perf/frame_profile b/scripts/perf/frame_profile
index 0a4e0a74ff..84eb1166d5 100755
--- a/scripts/perf/frame_profile
+++ b/scripts/perf/frame_profile
@@ -1,10 +1,43 @@
#!/usr/bin/env bash
exe="$1"
+
+if [[ -z "$exe" ]]
+then
+ # this script lives in scripts/perf
+ base="$(dirname "$0")/../.."
+ case $OSTYPE in
+ darwin*)
+ # Don't assume a build type (e.g. RelWithDebInfo). Collect all of
+ # both, and pick the most recent build.
+ exe="$(ls -t "$base"/build-darwin-x86_64/newview/*/"Second Life"*.app/Contents/MacOS/"Second Life"* | head -1)"
+ ;;
+
+ cygwin)
+ exe="$(ls -t "$base"/build-*/newview/*/secondlife-bin.exe | head -1)"
+ ;;
+
+ linux-gnu)
+ exe="$(ls -t "$base"/build-linux-*/newview/packaged/secondlife | head -1)"
+ ;;
+
+ *)
+ stderr "Unknown platform $OSTYPE"
+ exit 1
+ ;;
+ esac
+fi
+
+if [ -z "$exe" ]
+then stderr "No viewer package build found"
+ exit 1
+fi
+
+# If a Mac user specified the .app bundle itself, dig in for the executable.
if [[ "$OSTYPE" == darwin* && -d "$exe" && "$exe" == *.app ]]
then
exe="$(ls "$exe/Contents/MacOS/Second Life "*)"
fi
-"$exe" --autologin --luafile frame_profile_quit.lua \
+"$exe" --autologin --luafile 'frame_profile_quit.lua 228 232 26' \
http://maps.secondlife.com/secondlife/Bug%20Island/220/224/27