Home | History | Annotate | only in /system/extras/tests/sdcard
Up to higher level directory
NameDateSize
Android.mk21-Aug-20181K
plot_sdcard.py21-Aug-20188.9K
profile_sdcard.sh21-Aug-20181.9K
README21-Aug-20181.9K
sdcard_perf_test.cpp21-Aug-201821.3K
stopwatch.cpp21-Aug-20187.6K
stopwatch.h21-Aug-20185.6K
sysutil.cpp21-Aug-201814K
sysutil.h21-Aug-20185.7K
testcase.cpp21-Aug-20187K
testcase.h21-Aug-20185.9K

README

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