Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9ce8319
major mods for cmdline params, one script for desktop/android, etc. …
jesup Sep 1, 2020
f7f3c4a
Removed cold startup note from readme.md
acreskeyMoz Sep 23, 2020
1966e3f
Refactored to use arguments + progress bar
acreskeyMoz Oct 20, 2020
93f99b2
add prefs, fix some bugs, support for local wpr
jesup Nov 13, 2020
1373430
Add comparative prefs, other things
jesup Nov 20, 2020
2ed224e
Added variant file definition and features from jesup
acreskeyMoz Dec 4, 2020
56794d4
Cleaned up readme.me
acreskeyMoz Dec 4, 2020
f2a4c9c
Removed extranneous browsertime bin path
acreskeyMoz Dec 4, 2020
cfa08fa
Removed browsertime output
acreskeyMoz Dec 4, 2020
a57bdb0
Merge branch 'main' of github.com:acreskeyMoz/browsertime_on_android_…
acreskeyMoz Dec 4, 2020
87a14f6
Removed pycache
acreskeyMoz Dec 4, 2020
ffd23ce
Update README.md
acreskeyMoz Dec 15, 2020
85738ca
Added options to specify paths + small improvements
acreskeyMoz Dec 16, 2020
f24403f
Updated readme.md from new options
acreskeyMoz Dec 16, 2020
ab48ee4
Update variants_android.py
acreskeyMoz Dec 18, 2020
efece13
Fix to output path
acreskeyMoz Dec 18, 2020
d026883
Enabled webdriver pageload by default
acreskeyMoz Dec 21, 2020
5c78aef
Merge branch 'main' of github.com:acreskeyMoz/browsertime_scripts int…
acreskeyMoz Dec 21, 2020
fd67cc3
Defaulted keep original video to false to reduce storage use
acreskeyMoz Dec 21, 2020
93e4df0
Update sites.txt
acreskeyMoz Feb 1, 2021
32927e1
Add a bunch of commands to run_test.py; added mitm support
jesup Apr 16, 2021
65741cc
major mods for cmdline params, one script for desktop/android, etc. …
jesup Sep 1, 2020
759687e
add prefs, fix some bugs, support for local wpr
jesup Nov 13, 2020
7fd006b
Add comparative prefs, other things
jesup Nov 20, 2020
d2cac71
Add a bunch of commands to run_test.py; added mitm support
jesup Apr 16, 2021
a4d1d82
mitm comments
jesup Apr 16, 2021
f1f3e43
resolve merge issues
jesup Apr 16, 2021
08f2e13
resolve pull merge issues
jesup Apr 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions clear_apps.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ apps=("org.mozilla.firefox" \
"org.mozilla.fenix.performancetest" \
"org.mozilla.fennec_aurora")

export adb_bin=/home/jesup/.mozbuild/android-sdk-linux/platform-tools/adb
for app in ${apps[@]}; do
echo adb -s $ANDROID_SERIAL shell am force-stop $app
adb -s $ANDROID_SERIAL shell am force-stop $app
echo adb -s $ANDROID_SERIAL shell pm clear $app
adb -s $ANDROID_SERIAL shell pm clear $app
echo $adb_bin -s $ANDROID_SERIAL shell am force-stop $app
$adb_bin -s $ANDROID_SERIAL shell am force-stop $app
echo $adb_bin -s $ANDROID_SERIAL shell pm clear $app
$adb_bin -s $ANDROID_SERIAL shell pm clear $app
done
44 changes: 44 additions & 0 deletions desktop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
# N.B.: yargs doesn't parse `--firefox.android.intentArgument --ez`
# properly, so always use `=--ez`!

BASE='/home/jesup/src/mozilla/browsertime_on_android_scripts/'

#$BROWSERTIME_BIN \
# --browser firefox \
#N --skipHar \
# --firefox.binaryPath=/home/jesup/src/mozilla/pageload/obj-opt/dist/bin/firefox \
if test $PERF; then
SCRIPT=${BASE}perf.sh
else
SCRIPT=$FIREFOX_BINARY_LOCATION
fi
echo ./mach browsertime \
--firefox.binaryPath=\'"$SCRIPT"\' \
"$@"

./mach browsertime \
--firefox.binaryPath=\'"$SCRIPT"\' \
"$@"
#!/bin/bash
# N.B.: yargs doesn't parse `--firefox.android.intentArgument --ez`
# properly, so always use `=--ez`!

BASE='/home/jesup/src/mozilla/browsertime_on_android_scripts/'

#$BROWSERTIME_BIN \
# --browser firefox \
#N --skipHar \
# --firefox.binaryPath=/home/jesup/src/mozilla/pageload/obj-opt/dist/bin/firefox \
if test $PERF; then
SCRIPT=${BASE}perf.sh
else
SCRIPT=$FIREFOX_BINARY_LOCATION
fi
echo ./mach browsertime \
--firefox.binaryPath=\'"$SCRIPT"\' \
"$@"

./mach browsertime \
--firefox.binaryPath=\'"$SCRIPT"\' \
"$@"
42 changes: 42 additions & 0 deletions fenix_no_clear.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

#: PACKAGE ${PACKAGE:=org.mozilla.firefox}
: PACKAGE ${PACKAGE:=org.mozilla.fenix.performancetest}

export adb_bin="/home/jesup/.mozbuild/android-sdk-linux/platform-tools/adb"

if [[ -n $ANDROID_SERIAL ]] ; then
DEVICE_SERIAL_ARGS="--firefox.android.deviceSerial=$ANDROID_SERIAL --chrome.android.deviceSerial=$ANDROID_SERIAL"
else
DEVICE_SERIAL_ARGS=
fi

export BROWSERTIME_BIN=tools/browsertime/node_modules/browsertime/bin/browsertime.js

# N.B.: yargs doesn't parse `--firefox.android.intentArgument --ez`
# properly, so always use `=--ez`!
$BROWSERTIME_BIN \
--android \
--skipHar \
--firefox.geckodriverPath="/home/jesup/src/mozilla/browsertime_on_android_scripts/geckodriver" \
--firefox.android.package "$PACKAGE" \
--firefox.android.activity "org.mozilla.fenix.IntentReceiverActivity" \
--firefox.android.intentArgument=-a \
--firefox.android.intentArgument=android.intent.action.VIEW \
--firefox.android.intentArgument=-d \
--firefox.android.intentArgument="data:," \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
--firefox.android.intentArgument=--ez \
--firefox.android.intentArgument=performancetest \
--firefox.android.intentArgument=true \
--firefox.geckoProfiler true --firefox.geckoProfilerParams.interval 5 --firefox.geckoProfilerParams.features "js,stackwalk,leaf" --firefox.geckoProfilerParams.threads "GeckoMain,socket,url,ava,cert,html" \
--pageCompleteWaitTime 10000 \
-n 3 \
--resultDir "browsertime-results/remote_settings_condprof/" \
--browsertime.url https://www.google.com/ \
--firefox.profileTemplate=/home/jesup/src/mozilla/browsertime_on_android_scripts/fenix.profile \
--firefox.preference services.settings.loglevel:debug \
https://www.google.com/

$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
5 changes: 4 additions & 1 deletion fenix_perf.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

export adb_bin="~/.mozbuild/android-sdk-linux/platform-tools/adb"

bash ./clear_apps.sh

if [[ -n $ANDROID_SERIAL ]] ; then
Expand All @@ -24,7 +26,8 @@ $BROWSERTIME_BIN \
--firefox.android.intentArgument=-d \
--firefox.android.intentArgument="$LAUNCH_URL" \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
$DEVICE_SERIAL_ARGS \
"$@"

adb -s $ANDROID_SERIAL shell am force-stop $PACKAGE
$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
31 changes: 31 additions & 0 deletions fenix_performancetest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

: PACKAGE ${PACKAGE:=org.mozilla.fenix.performancetest}

bash /home/jesup/src/mozilla/browsertime_on_android_scripts/clear_apps.sh
export adb_bin="/home/jesup/.mozbuild/android-sdk-linux/platform-tools/adb"

if [[ -n $ANDROID_SERIAL ]] ; then
DEVICE_SERIAL_ARGS="--firefox.android.deviceSerial=$ANDROID_SERIAL --chrome.android.deviceSerial=$ANDROID_SERIAL"
else
DEVICE_SERIAL_ARGS=
fi

# N.B.: yargs doesn't parse `--firefox.android.intentArgument --ez`
# properly, so always use `=--ez`!
$BROWSERTIME_BIN \
--android \
--skipHar \
--firefox.geckodriverPath="$GECKODRIVER_PATH" \
--firefox.android.package "$PACKAGE" \
--firefox.android.activity "org.mozilla.fenix.IntentReceiverActivity" \
--firefox.android.intentArgument=-a \
--firefox.android.intentArgument=android.intent.action.VIEW \
--firefox.android.intentArgument=-d \
--firefox.android.intentArgument="data:," \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
$DEVICE_SERIAL_ARGS \
"$@"

$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
32 changes: 32 additions & 0 deletions fenix_performancetest_condprof.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

: PACKAGE ${PACKAGE:=org.mozilla.fenix.performancetest}

bash /home/jesup/src/mozilla/browsertime_on_android_scripts/clear_apps.sh
export adb_bin="/home/jesup/.mozbuild/android-sdk-linux/platform-tools/adb"

if [[ -n $ANDROID_SERIAL ]] ; then
DEVICE_SERIAL_ARGS="--firefox.android.deviceSerial=$ANDROID_SERIAL --chrome.android.deviceSerial=$ANDROID_SERIAL"
else
DEVICE_SERIAL_ARGS=
fi

# N.B.: yargs doesn't parse `--firefox.android.intentArgument --ez`
# properly, so always use `=--ez`!
$BROWSERTIME_BIN \
--android \
--skipHar \
--firefox.geckodriverPath="$GECKODRIVER_PATH" \
--firefox.android.package "$PACKAGE" \
--firefox.android.activity "org.mozilla.fenix.IntentReceiverActivity" \
--firefox.android.intentArgument=-a \
--firefox.android.intentArgument=android.intent.action.VIEW \
--firefox.android.intentArgument=-d \
--firefox.android.intentArgument="data:," \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
--firefox.profileTemplate=/home/jesup/src/mozilla/browsertime_on_android_scripts/fenix.profile \
$DEVICE_SERIAL_ARGS \
"$@"

$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
34 changes: 34 additions & 0 deletions fenix_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

: PACKAGE ${PACKAGE:=org.mozilla.firefox}

bash /home/jesup/src/mozilla/browsertime_on_android_scripts/clear_apps.sh
export adb_bin="/home/jesup/.mozbuild/android-sdk-linux/platform-tools/adb"

if [[ -n $ANDROID_SERIAL ]] ; then
DEVICE_SERIAL_ARGS="--firefox.android.deviceSerial=$ANDROID_SERIAL --chrome.android.deviceSerial=$ANDROID_SERIAL"
else
DEVICE_SERIAL_ARGS=
fi

# N.B.: yargs doesn't parse `--firefox.android.intentArgument --ez`
# properly, so always use `=--ez`!
$BROWSERTIME_BIN \
--android \
--skipHar \
--firefox.geckodriverPath="$GECKODRIVER_PATH" \
--firefox.android.package "$PACKAGE" \
--firefox.android.activity "org.mozilla.fenix.IntentReceiverActivity" \
--firefox.android.intentArgument=-a \
--firefox.android.intentArgument=android.intent.action.VIEW \
--firefox.android.intentArgument=-d \
--firefox.android.intentArgument="data:," \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
--firefox.android.intentArgument=--ez \
--firefox.android.intentArgument=performancetest \
--firefox.android.intentArgument=true \
$DEVICE_SERIAL_ARGS \
"$@"

$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
35 changes: 35 additions & 0 deletions fenix_release_condprof.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

: PACKAGE ${PACKAGE:=org.mozilla.firefox}

bash /home/jesup/src/mozilla/browsertime_on_android_scripts/stop_apps.sh
export adb_bin="/home/jesup/.mozbuild/android-sdk-linux/platform-tools/adb"

if [[ -n $ANDROID_SERIAL ]] ; then
DEVICE_SERIAL_ARGS="--firefox.android.deviceSerial=$ANDROID_SERIAL --chrome.android.deviceSerial=$ANDROID_SERIAL"
else
DEVICE_SERIAL_ARGS=
fi

# N.B.: yargs doesn't parse `--firefox.android.intentArgument --ez`
# properly, so always use `=--ez`!
$BROWSERTIME_BIN \
--android \
--skipHar \
--firefox.geckodriverPath="$GECKODRIVER_PATH" \
--firefox.android.package "$PACKAGE" \
--firefox.android.activity "org.mozilla.fenix.IntentReceiverActivity" \
--firefox.android.intentArgument=-a \
--firefox.android.intentArgument=android.intent.action.VIEW \
--firefox.android.intentArgument=-d \
--firefox.android.intentArgument="data:," \
--firefox.profileTemplate=/home/jesup/src/mozilla/browsertime_on_android_scripts/fenix.profile \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
--firefox.android.intentArgument=--ez \
--firefox.android.intentArgument=performancetest \
--firefox.android.intentArgument=true \
$DEVICE_SERIAL_ARGS \
"$@"

$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
4 changes: 3 additions & 1 deletion fennec.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

export adb_bin="~/.mozbuild/android-sdk-linux/platform-tools/adb"
bash ./clear_apps.sh

if [[ -n $ANDROID_SERIAL ]] ; then
Expand All @@ -24,7 +25,8 @@ $BROWSERTIME_BIN \
--firefox.android.intentArgument=skipstartpane \
--firefox.android.intentArgument=true \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
$DEVICE_SERIAL_ARGS \
"$@"

adb -s $ANDROID_SERIAL shell am force-stop $PACKAGE
$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
34 changes: 34 additions & 0 deletions fennec_condprof.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
: PACKAGE ${PACKAGE:=org.mozilla.firefox}

bash /home/jesup/src/mozilla/browsertime_on_android_scripts/stop_apps.sh
export adb_bin="/home/jesup/.mozbuild/android-sdk-linux/platform-tools/adb"

if [[ -n $ANDROID_SERIAL ]] ; then
DEVICE_SERIAL_ARGS="--firefox.android.deviceSerial=$ANDROID_SERIAL --chrome.android.deviceSerial=$ANDROID_SERIAL"
else
DEVICE_SERIAL_ARGS=
fi

# N.B.: yargs doesn't parse `--firefox.android.intentArgument --ez`
# properly, so always use `=--ez`!
$BROWSERTIME_BIN \
--android \
--skipHar \
--firefox.geckodriverPath="$GECKODRIVER_PATH" \
--firefox.android.package "$PACKAGE" \
--firefox.android.activity 'org.mozilla.gecko.BrowserApp' \
--firefox.android.intentArgument=-a \
--firefox.android.intentArgument=android.intent.action.VIEW \
--firefox.android.intentArgument=-d \
--firefox.android.intentArgument="data:," \
--firefox.android.intentArgument=--ez \
--firefox.android.intentArgument=skipstartpane \
--firefox.android.intentArgument=true \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
--firefox.profileTemplate=/home/jesup/src/mozilla/browsertime_on_android_scripts/fennec.profile \
$DEVICE_SERIAL_ARGS \
"$@"

$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
4 changes: 3 additions & 1 deletion gve.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

export adb_bin="~/.mozbuild/android-sdk-linux/platform-tools/adb"
bash ./clear_apps.sh

if [[ -n $ANDROID_SERIAL ]] ; then
Expand All @@ -21,7 +22,8 @@ $BROWSERTIME_BIN \
--firefox.android.intentArgument=-d \
--firefox.android.intentArgument="$LAUNCH_URL" \
--browser firefox \
--firefox.binaryPath=/tmp/foo \
$DEVICE_SERIAL_ARGS \
"$@"

adb -s $ANDROID_SERIAL shell am force-stop $PACKAGE
$adb_bin -s $ANDROID_SERIAL shell am force-stop $PACKAGE
3 changes: 3 additions & 0 deletions perf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
echo perf record -g -F 999 $FIREFOX_BINARY_LOCATION $* >/tmp/command
perf record -g -F 999 $FIREFOX_BINARY_LOCATION $*
4 changes: 2 additions & 2 deletions preload.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = async function(context, commands) {
let url = context.options.browsertime.url;
await commands.navigate('https://www.mozilla.org/en-US/');
await commands.wait.byTime(10000);
await commands.navigate('about:blank');
await commands.wait.byTime(5000);
await commands.navigate('about:blank');
await commands.wait.byTime(2000);
return commands.measure.start(url);
};
8 changes: 8 additions & 0 deletions preload_slim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = async function(context, commands) {
let url = context.options.browsertime.url;
// await commands.navigate('https://www.example.com');
// await commands.wait.byTime(10000);
// await commands.navigate('about:blank');
// await commands.wait.byTime(5000);
return commands.measure.start(url);
};
Loading