Last active
December 21, 2018 13:24
-
-
Save shakalaca/789637aea2014de53ef780075b7517b8 to your computer and use it in GitHub Desktop.
/vendor/etc/Storage_Benchmark.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ASUS_BSP Deeo : set io_is_busy while benchmark +++ | |
service StorageBench /vendor/bin/sh /vendor/etc/Storage_Benchmark.sh | |
class core | |
user root | |
oneshot | |
disabled | |
on property:sys.foregroundapp=* | |
start StorageBench | |
#ASUS_BSP Deeo : set io_is_busy while benchmark --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
list=( | |
'com.quicinc.vellamo' | |
'com.andromeda.androbench2' | |
'com.a1dev.sdbench' | |
'com.futuremark.pcmark.android.benchmark' | |
) | |
checklist() | |
{ | |
i=0 | |
while [ $i -ne ${#list[@]} ] | |
do | |
if [ ${list[$i]} = $1 ]; then | |
echo 1 | |
return | |
fi | |
((i++)) | |
done | |
echo 0 | |
return | |
} | |
#app=`getprop sys.storage.bchmode` | |
app=`getprop sys.foregroundapp` | |
#echo "onFgAPP is $app" | |
result=`checklist $app` | |
#echo $result | |
if [ $result != "0" ]; then | |
echo "set 1" | |
echo 1 > sys/devices/system/cpu/cpufreq/policy0/interactive/io_is_busy | |
echo 1 > sys/devices/system/cpu/cpufreq/policy4/interactive/io_is_busy | |
else | |
echo "set 0" | |
echo 0 > sys/devices/system/cpu/cpufreq/policy0/interactive/io_is_busy | |
echo 0 > sys/devices/system/cpu/cpufreq/policy4/interactive/io_is_busy | |
fi | |
if [ $app != "com.a1dev.sdbench" ];then | |
echo 20 > /proc/sys/vm/dirty_ratio | |
else | |
echo 1 > /proc/sys/vm/dirty_ratio | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment