main-foreground.sh (1119B)
1 #!/bin/bash 2 # This Source Code Form is subject to the terms of the Mozilla Public 3 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 6 # Name: foreground-resource 7 # Owner: Perf Team 8 # Description: Runs a background CPU test on mobile 9 # Options: {"default": {"perfherder": true, "perfherder-metrics": [{ "name": "time", "unit": "s" }, { "name": "rss-memory", "unit": "s" }, { "name": "pss-memory", "unit": "s" }]}} #noqa 10 11 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 12 TEST_TIME=600 13 export RUN_BACKGROUND=False 14 15 bash $SCRIPT_DIR/collect-proc-info-cpu.sh $SCRIPT_DIR $TEST_TIME & 16 bash $SCRIPT_DIR/collect-proc-info-memory.sh $SCRIPT_DIR $TEST_TIME & 17 bash $SCRIPT_DIR/test-android-resource-usage.sh $TEST_TIME & 18 wait 19 pkill -f "sh test-background-resource-usage" 20 pkill -f "sh collect-proc-info-cpu" 21 pkill -f "sh collect-proc-info-memory" 22 rm $TESTING_DIR/test_start.signal 23 rm $TESTING_DIR/test_end.signal 24 pkill -f "sh main" 25 26 python3 $SCRIPT_DIR/parse_resource_usage.py $TESTING_DIR $BROWSER_BINARY $RUN_BACKGROUND