blob: 436942e86866e66ee2e4ae57f85bd2f517b3e3e4 [file] [log] [blame]
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
report_results()
{
local TEST=$1
local PLATFORM=$2
local MEASUREMENTS=$3
curl --header "Content-Type: application/json" \
--request POST \
--data "{\"test\":\"$TEST\",\"platform\":\"$PLATFORM\",\"results\":$MEASUREMENTS}" \
http://localhost:4040
}
launch_apk()
{
local APK_PATH=$1
local BUNDLE_NAME=$2
local ACTIVITY_NAME=$3
adb install -r $APK_PATH
adb shell am start -n $BUNDLE_NAME/$BUNDLE_NAME.$ACTIVITY_NAME
}
read_app_total_memory()
{
local BUNDLE_NAME=$1
adb shell dumpsys meminfo $BUNDLE_NAME | sed -n 's/.*TOTAL:[ ]*\([0-9]*\).*/\1/p'
}