Skip to content

Commit 2ed696d

Browse files
authored
Collect device state before and after run (#11017)
Store it in $DEVICEFARM_LOG_DIR
1 parent 5866c19 commit 2ed696d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

extension/benchmark/android/benchmark/android-llm-device-farm-test-spec.yml.j2

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ phases:
105105
echo "*.model tokenizer files found in /data/local/tmp/minibench/"
106106
fi
107107

108+
- echo "Collect device state before running"
109+
- |
110+
adb -s $DEVICEFARM_DEVICE_UDID shell 'cat /sys/devices/system/cpu/cpu*/cpufreq/stats/time_in_state /sys/devices/system/cpu/cpu*/cpufreq/stats/trans_table' > $DEVICEFARM_LOG_DIR/state_before.txt
111+
108112
- echo "Run benchmark"
109113
- |
110114
adb -s $DEVICEFARM_DEVICE_UDID shell touch /data/local/tmp/result.etdump
@@ -128,7 +132,10 @@ phases:
128132
adb -s $DEVICEFARM_DEVICE_UDID shell am start -W -n org.pytorch.minibench/.BenchmarkActivity \
129133
--es "model_dir" "/data/local/tmp/minibench"
130134
fi
131-
135+
136+
- echo "Collect device state after running"
137+
- |
138+
adb -s $DEVICEFARM_DEVICE_UDID shell 'cat /sys/devices/system/cpu/cpu*/cpufreq/stats/time_in_state /sys/devices/system/cpu/cpu*/cpufreq/stats/trans_table' > $DEVICEFARM_LOG_DIR/state_after.txt
132139

133140
post_test:
134141
commands:

0 commit comments

Comments
 (0)