Branch
Hash :
1a97e039
Author :
Date :
2024-09-17T11:40:29
restricted_trace_perf: Support multiple users This CL adds some tracking data for the current user and storage locations. It moves away from using sdcard at all. Test: restricted_trace_perf.py with non-default user Bug: b/361388557 Change-Id: Ifff9b5e4ba9b184cc5a4339417723ecb7d35a4a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5869168 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
#!/bin/bash
#
# Copyright 2021 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
sleep_duration=$1
if [ -z "${sleep_duration}" ]; then
echo "No sleep_duration provided"
exit 1
fi
storage_dir=$2
if [ -z "${storage_dir}" ]; then
echo "No storage_dir provided"
exit 1
fi
start_time=$SECONDS
while true; do
pid=$(pidof com.android.angle.test:test_process)
case $pid in
''|*[!0-9]*) echo pid is not a number ;;
*) echo com.android.angle.test:test_process $pid >> ${storage_dir}/gpumem.txt ;;
esac
dumpsys gpu --gpumem >> ${storage_dir}/gpumem.txt
time_elapsed=$(( SECONDS - start_time ))
echo "time_elapsed: $time_elapsed" >> ${storage_dir}/gpumem.txt
sleep ${sleep_duration};
done