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

..04-Dec-20154 KiB

Android.mk04-Dec-20151 KiB

plot_sdcard.py04-Dec-20158.9 KiB

profile_sdcard.sh04-Dec-20151.9 KiB

README04-Dec-20151.9 KiB

sdcard_perf_test.cpp04-Dec-201521.3 KiB

stopwatch.cpp04-Dec-20157.6 KiB

stopwatch.h04-Dec-20155.6 KiB

sysutil.cpp04-Dec-201514 KiB

sysutil.h04-Dec-20155.7 KiB

testcase.cpp04-Dec-20157 KiB

testcase.h04-Dec-20155.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