Hi Xunlei,
On 24 June 2015 at 09:37, Xunlei Pang xlpang@126.com wrote:
From: Xunlei Pang pang.xunlei@linaro.org
[snip]
diff --git a/doc/examples/cpufreq_governor_efficiency/test.sh b/doc/examples/cpufreq_governor_efficiency/test.sh new file mode 100755 index 0000000..0160952 --- /dev/null +++ b/doc/examples/cpufreq_governor_efficiency/test.sh @@ -0,0 +1,104 @@ +#!/bin/sh
+set -e
+test_efficiency() {
FILENAME="results_$RANDOM$$.txt"if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ]; then
cpu0 should be replaced by the target CPU: cpu$2
for i in $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors); do
idem
if [ $i = $1 ] ; thengov_target=$ifiexport gov_$i=$(echo $i)doneelseecho "cpufreq sysfs is not available!"exitfiif [ ! $gov_target ] ; thenecho " Can't find $1 governor!"exitfiif [ ! $gov_performance ] ; thenecho "Can't find performance governor!"exitfiif [ ! $gov_powersave ] ; thenecho "Can't find powersave governor!"exitfiif [ $gov_target = $gov_performance ] || [ $gov_target = $gov_powersave ] ; thenecho "Please input a governor other than \"performance\" or \"powersave\""exit
[snip]
-- 1.9.1