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 ] ; then
gov_target=$i
fi
export gov_$i=$(echo $i)
done
else
echo "cpufreq sysfs is not available!"
exit
fi
if [ ! $gov_target ] ; then
echo " Can't find $1 governor!"
exit
fi
if [ ! $gov_performance ] ; then
echo "Can't find performance governor!"
exit
fi
if [ ! $gov_powersave ] ; then
echo "Can't find powersave governor!"
exit
fi
if [ $gov_target = $gov_performance ] || [ $gov_target = $gov_powersave ] ; then
echo "Please input a governor other than \"performance\" or \"powersave\""
exit
[snip]
-- 1.9.1