File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
extension/benchmark/android/benchmark Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,20 @@ phases:
105
105
echo "*.model tokenizer files found in /data/local/tmp/minibench/"
106
106
fi
107
107
108
+ - echo "Collect Device Telemetry CPU scaling configuration"
109
+ - |
110
+ adb -s $DEVICEFARM_DEVICE_UDID shell '
111
+ for core_path in /sys/devices/system/cpu/cpu*/cpufreq; do
112
+ if [ -d "$core_path" ]; then
113
+ core_name=$(basename $(dirname $core_path))
114
+ governor=$(cat $core_path/scaling_governor 2>/dev/null || echo "N/A")
115
+ min_freq=$(cat $core_path/scaling_min_freq 2>/dev/null || echo "N/A")
116
+ max_freq=$(cat $core_path/scaling_max_freq 2>/dev/null || echo "N/A")
117
+ echo "$core_name|$governor|$min_freq|$max_freq"
118
+ fi
119
+ done
120
+ ' > $DEVICEFARM_LOG_DIR/cpu_scaling_config.txt
121
+
108
122
- echo "Collect device state before running"
109
123
- |
110
124
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
@@ -132,7 +146,7 @@ phases:
132
146
adb -s $DEVICEFARM_DEVICE_UDID shell am start -W -n org.pytorch.minibench/.BenchmarkActivity \
133
147
--es "model_dir" "/data/local/tmp/minibench"
134
148
fi
135
-
149
+
136
150
- echo "Collect device state after running"
137
151
- |
138
152
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
You can’t perform that action at this time.
0 commit comments