• Home
  • History
  • Annotate
  • only in /system/extras/tests/sdcard/
NameDateSize

..29-Aug-20174 KiB

Android.mk29-Aug-20171 KiB

plot_sdcard.py29-Aug-20178.9 KiB

profile_sdcard.sh29-Aug-20171.9 KiB

README29-Aug-20171.9 KiB

sdcard_perf_test.cpp29-Aug-201721.3 KiB

stopwatch.cpp29-Aug-20177.6 KiB

stopwatch.h29-Aug-20175.6 KiB

sysutil.cpp29-Aug-201714 KiB

sysutil.h29-Aug-20175.7 KiB

testcase.cpp29-Aug-20177 KiB

testcase.h29-Aug-20175.9 KiB

README

1This directory contains tools to profile the sdcard performance.
2
3There are 2 parts to the tool:
4* A binary that runs on the device, exercises the sdcard and send
5  measurment data back to the host (sdcard_perf_test).
6* A host python script to plot the data.
7
8Additionally, there is script 'profile_sdcard.sh' that allows you
9to check how the sdcard scale with the number of processes.
10
11INSTALLATION
12============
13Build, install and mount debugfs. In this directory with a properly
14configured enviroment:
15
16  mm SDCARD_TESTS=1
17  adb remount
18  adb push $ANDROID_PRODUCT_OUT/system/bin/sdcard_perf_test /system/bin/sdcard_perf_test
19  adb shell mount -t debugfs none /sys/kernel/debug
20
21If you want to graph the results you need gnuplot and numpy:
22
23  sudo apt-get install gnuplot python-numpy python-numeric
24
25You need Gnuplot.py version 1.8 (not the one coming with ubuntu).
26Download it from the Gnuplot.py web site.  Extract to a temp
27directory, chdir and run:
28
29  sudo python setup.py install
30
31
32INVOCATION
33==========
34
35Run a simple test:
36
37  adb shell sdcard_perf_test --test=write --size=1000 --chunk-size=100 --procnb=1 --iterations=100
38
39This test will write 1000kbyte (1M) files using writes of 100kbytes (so 10 writes per file) using
40only 1 process for 100 times (100 files will be written on the sdcard).
41The test will not call sync to flush the writes.
42At the end of the test, some stats for the 'open' and 'write' system calls are written.
43
44If you want to plot the data, you need to use the --dump option and provide a file:
45
46  adb shell sdcard_perf_test --test=write --size=1000 --chunk-size=100 --procnb=1 --iterations=100 --dump >/tmp/data.txt
47
48PLOTTING
49========
50
51To plot the result using the iter number of the x axis:
52
53  plot_sdcard.py -i /tmp/data.txt
54
55To plot the result using time for the x axis:
56
57  plot_sdcard.py -t /tmp/data.txt
58
59To plot the result from the profiler:
60
61    profile_sdcard.sh
62    plot_sdcard.py -p
63
64