lmbench andlmbench 移植测试

/***********************************************************************
 *                   lmbench andlmbench 移植测试
 * 说明:
 *     想要移植一下lmbench性能测试软件对Android系统性能进行测试,但发现
 * Android的Linux shell命令太少了,总是出错,使用另外的busybox创建软链接,
 * 这样才能测试系统,目前没有自己去做busybox。
 *
 *                                      2016-8-3 深圳 南山平山村 曾剑锋
 **********************************************************************/

一、参考文档:
    1. android busybox解决adbshell命令不全
        http://www.voidcn.com/blog/lhj0711010212/article/p-1515574.html
    2. Busybox for android
        http://benno.id.au/blog/2007/11/14/android-busybox
    3. Android Device中添加busybox
        http://haking.iteye.com/blog/1250500
    4. Lmbench
        http://processors.wiki.ti.com/index.php/Lmbench

二、下载andlmbench
    https://github.com/shizkr/andlmbench

三、编译:
    ./remmm.sh /home/zengjf/cmd/andlmbench-master

四、运行:
    1. 查看怎么运行(andlmbench-master/scripts/Android.mk):
        ifeq ($(BUILD_LMBENCH),true)
        LOCAL_PATH := $(call my-dir)

        include $(CLEAR_VARS)

        LOCAL_MODULE := runlmbench
        LOCAL_SRC_FILES := $(LOCAL_MODULE)
        LOCAL_MODULE_CLASS := EXECUTABLES
        LOCAL_MODULE_TAGS := eng
        LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)

        include $(BUILD_PREBUILT)
    2. 于是可以看出:
        最终的可执行程序是runlmbench
            
五、错误:
    1. error1:
        1. 现象:
            root@android:/ # runlmbench                                                    
            /system/bin/runlmbench[393]: which: not found
            ERROR: dd doesn't exist to run lmbench tool!!!
        2. 原因(cat runlmbench):
            verifytools() {
                for tool in $1
                do
                    valid=$(which $tool | grep "" -c)
                    if [ "$valid" != "1" ]; then
                        echo "ERROR: $tool doesn't exist to run lmbench tool!!!"
                        exit 1
                    fi
                done
            }
        3. 测试which命令不存在:
            root@android:/ # which dd
            /system/bin/sh: which: not found
            root@android:/ # 
        4. 测试busybox which命令是否存在:
            root@android:/ # busybox which
            BusyBox v1.15.3 (2011-11-25 17:55:55 CST) multi-call binary

            Usage: which [COMMAND]...

            Locate a COMMAND

            root@android:/ #
    2. error2:
        1. 现象:
            root@android:/ # runlmbench                                                    
            ERROR: sed doesn't exist to run lmbench tool!!!
        2. 测试sed命令:
            root@android:/ # sed
            /system/bin/sh: sed: not found
        3. 原因:
            本套Android系统中没有完整的Linux shell命令,可能要考虑使用busybox重新生成软链接才行。
        4. 下载Android用的busybox:
            http://benno.id.au/blog/2007/11/14/android-busybox
        5. 运行busybox --install . 报错:
            root@android:/data/local # ./busybox --install .                               
            busybox: /data/busybox/[: No such file or directory
            busybox: /data/busybox/[[: No such file or directory
            busybox: /data/busybox/addgroup: No such file or directory
            busybox: /data/busybox/adduser: No such file or directory
            busybox: /data/busybox/adjtimex: No such file or directory
            busybox: /data/busybox/ar: No such file or directory
            busybox: /data/busybox/arp: No such file or directory
            busybox: /data/busybox/arping: No such file or directory
            busybox: /data/busybox/ash: No such file or directory
            busybox: /data/busybox/awk: No such file or directory
            busybox: /data/busybox/basename: No such file or directory
            busybox: /data/busybox/bunzip2: No such file or directory
            busybox: /data/busybox/bzcat: No such file or directory
            busybox: /data/busybox/bzip2: No such file or directory
            busybox: /data/busybox/cal: No such file or directory
            busybox: /data/busybox/cat: No such file or directory
            busybox: /data/busybox/catv: No such file or directory
            busybox: /data/busybox/chattr: No such file or directory
            busybox: /data/busybox/chgrp: No such file or directory
            busybox: /data/busybox/chmod: No such file or directory
            busybox: /data/busybox/chown: No such file or directory
            busybox: /data/busybox/chpasswd: No such file or directory
            busybox: /data/busybox/chpst: No such file or directory
            busybox: /data/busybox/chroot: No such file or directory
            busybox: /data/busybox/chrt: No such file or directory
            busybox: /data/busybox/chvt: No such file or directory
            busybox: /data/busybox/cksum: No such file or directory
            busybox: /data/busybox/clear: No such file or directory
            busybox: /data/busybox/cmp: No such file or directory
            busybox: /data/busybox/comm: No such file or directory
            busybox: /data/busybox/cp: No such file or directory
            busybox: /data/busybox/cpio: No such file or directory
            busybox: /data/busybox/crond: No such file or directory
            busybox: /data/busybox/crontab: No such file or directory
            busybox: /data/busybox/cryptpw: No such file or directory
            busybox: /data/busybox/cut: No such file or directory
            busybox: /data/busybox/date: No such file or directory
            busybox: /data/busybox/dc: No such file or directory
            busybox: /data/busybox/dd: No such file or directory
            busybox: /data/busybox/deallocvt: No such file or directory
            busybox: /data/busybox/delgroup: No such file or directory
            busybox: /data/busybox/deluser: No such file or directory
            busybox: /data/busybox/df: No such file or directory
            busybox: /data/busybox/dhcprelay: No such file or directory
            busybox: /data/busybox/diff: No such file or directory
            busybox: /data/busybox/dirname: No such file or directory
            busybox: /data/busybox/dmesg: No such file or directory
            busybox: /data/busybox/dnsd: No such file or directory
            busybox: /data/busybox/dos2unix: No such file or directory
            busybox: /data/busybox/du: No such file or directory
            busybox: /data/busybox/dumpkmap: No such file or directory
            busybox: /data/busybox/dumpleases: No such file or directory
            busybox: /data/busybox/echo: No such file or directory
            busybox: /data/busybox/ed: No such file or directory
            busybox: /data/busybox/egrep: No such file or directory
            busybox: /data/busybox/eject: No such file or directory
            busybox: /data/busybox/env: No such file or directory
            busybox: /data/busybox/envdir: No such file or directory
            busybox: /data/busybox/envuidgid: No such file or directory
            busybox: /data/busybox/ether-wake: No such file or directory
            busybox: /data/busybox/expand: No such file or directory
            busybox: /data/busybox/expr: No such file or directory
            busybox: /data/busybox/fakeidentd: No such file or directory
            busybox: /data/busybox/false: No such file or directory
            busybox: /data/busybox/fbset: No such file or directory
            busybox: /data/busybox/fdflush: No such file or directory
            busybox: /data/busybox/fdformat: No such file or directory
            busybox: /data/busybox/fdisk: No such file or directory
            busybox: /data/busybox/fgrep: No such file or directory
            busybox: /data/busybox/find: No such file or directory
            busybox: /data/busybox/fold: No such file or directory
            busybox: /data/busybox/free: No such file or directory
            busybox: /data/busybox/freeramdisk: No such file or directory
            busybox: /data/busybox/fsck: No such file or directory
            busybox: /data/busybox/fsck.minix: No such file or directory
            busybox: /data/busybox/ftpget: No such file or directory
            busybox: /data/busybox/ftpput: No such file or directory
            busybox: /data/busybox/fuser: No such file or directory
            busybox: /data/busybox/getopt: No such file or directory
            busybox: /data/busybox/getty: No such file or directory
            busybox: /data/busybox/grep: No such file or directory
            busybox: /data/busybox/gunzip: No such file or directory
            busybox: /data/busybox/gzip: No such file or directory
            busybox: /data/busybox/halt: No such file or directory
            busybox: /data/busybox/hdparm: No such file or directory
            busybox: /data/busybox/head: No such file or directory
            busybox: /data/busybox/hexdump: No such file or directory
            busybox: /data/busybox/hostid: No such file or directory
            busybox: /data/busybox/hostname: No such file or directory
            busybox: /data/busybox/httpd: No such file or directory
            busybox: /data/busybox/hwclock: No such file or directory
            busybox: /data/busybox/id: No such file or directory
            busybox: /data/busybox/ifconfig: No such file or directory
            busybox: /data/busybox/ifdown: No such file or directory
            busybox: /data/busybox/ifup: No such file or directory
            busybox: /data/busybox/inetd: No such file or directory
            busybox: /data/busybox/init: No such file or directory
            busybox: /data/busybox/insmod: No such file or directory
            busybox: /data/busybox/install: No such file or directory
            busybox: /data/busybox/ip: No such file or directory
            busybox: /data/busybox/ipaddr: No such file or directory
            busybox: /data/busybox/ipcalc: No such file or directory
            busybox: /data/busybox/ipcrm: No such file or directory
            busybox: /data/busybox/ipcs: No such file or directory
            busybox: /data/busybox/iplink: No such file or directory
            busybox: /data/busybox/iproute: No such file or directory
            busybox: /data/busybox/iprule: No such file or directory
            busybox: /data/busybox/iptunnel: No such file or directory
            busybox: /data/busybox/kbd_mode: No such file or directory
            busybox: /data/busybox/kill: No such file or directory
            busybox: /data/busybox/killall: No such file or directory
            busybox: /data/busybox/killall5: No such file or directory
            busybox: /data/busybox/klogd: No such file or directory
            busybox: /data/busybox/last: No such file or directory
            busybox: /data/busybox/length: No such file or directory
            busybox: /data/busybox/less: No such file or directory
            busybox: /data/busybox/linux32: No such file or directory
            busybox: /data/busybox/linux64: No such file or directory
            busybox: /data/busybox/linuxrc: No such file or directory
            busybox: /data/busybox/ln: No such file or directory
            busybox: /data/busybox/loadfont: No such file or directory
            busybox: /data/busybox/loadkmap: No such file or directory
            busybox: /data/busybox/logger: No such file or directory
            busybox: /data/busybox/login: No such file or directory
            busybox: /data/busybox/logname: No such file or directory
            busybox: /data/busybox/logread: No such file or directory
            busybox: /data/busybox/losetup: No such file or directory
            busybox: /data/busybox/ls: No such file or directory
            busybox: /data/busybox/lsattr: No such file or directory
            busybox: /data/busybox/lsmod: No such file or directory
            busybox: /data/busybox/lzmacat: No such file or directory
            busybox: /data/busybox/makedevs: No such file or directory
            busybox: /data/busybox/md5sum: No such file or directory
            busybox: /data/busybox/mdev: No such file or directory
            busybox: /data/busybox/mesg: No such file or directory
            busybox: /data/busybox/microcom: No such file or directory
            busybox: /data/busybox/mkdir: No such file or directory
            busybox: /data/busybox/mkfifo: No such file or directory
            busybox: /data/busybox/mkfs.minix: No such file or directory
            busybox: /data/busybox/mknod: No such file or directory
            busybox: /data/busybox/mkswap: No such file or directory
            busybox: /data/busybox/mktemp: No such file or directory
            busybox: /data/busybox/modprobe: No such file or directory
            busybox: /data/busybox/more: No such file or directory
            busybox: /data/busybox/mount: No such file or directory
            busybox: /data/busybox/mountpoint: No such file or directory
            busybox: /data/busybox/mt: No such file or directory
            busybox: /data/busybox/mv: No such file or directory
            busybox: /data/busybox/nameif: No such file or directory
            busybox: /data/busybox/nc: No such file or directory
            busybox: /data/busybox/netstat: No such file or directory
            busybox: /data/busybox/nice: No such file or directory
            busybox: /data/busybox/nmeter: No such file or directory
            busybox: /data/busybox/nohup: No such file or directory
            busybox: /data/busybox/nslookup: No such file or directory
            busybox: /data/busybox/od: No such file or directory
            busybox: /data/busybox/openvt: No such file or directory
            busybox: /data/busybox/passwd: No such file or directory
            busybox: /data/busybox/patch: No such file or directory
            busybox: /data/busybox/pgrep: No such file or directory
            busybox: /data/busybox/pidof: No such file or directory
            busybox: /data/busybox/ping: No such file or directory
            busybox: /data/busybox/ping6: No such file or directory
            busybox: /data/busybox/pipe_progress: No such file or directory
            busybox: /data/busybox/pivot_root: No such file or directory
            busybox: /data/busybox/pkill: No such file or directory
            busybox: /data/busybox/poweroff: No such file or directory
            busybox: /data/busybox/printenv: No such file or directory
            busybox: /data/busybox/printf: No such file or directory
            busybox: /data/busybox/ps: No such file or directory
            busybox: /data/busybox/pscan: No such file or directory
            busybox: /data/busybox/pwd: No such file or directory
            busybox: /data/busybox/raidautorun: No such file or directory
            busybox: /data/busybox/rdate: No such file or directory
            busybox: /data/busybox/readlink: No such file or directory
            busybox: /data/busybox/readprofile: No such file or directory
            busybox: /data/busybox/realpath: No such file or directory
            busybox: /data/busybox/reboot: No such file or directory
            busybox: /data/busybox/renice: No such file or directory
            busybox: /data/busybox/reset: No such file or directory
            busybox: /data/busybox/resize: No such file or directory
            busybox: /data/busybox/rm: No such file or directory
            busybox: /data/busybox/rmdir: No such file or directory
            busybox: /data/busybox/rmmod: No such file or directory
            busybox: /data/busybox/route: No such file or directory
            busybox: /data/busybox/rpm: No such file or directory
            busybox: /data/busybox/rpm2cpio: No such file or directory
            busybox: /data/busybox/run-parts: No such file or directory
            busybox: /data/busybox/runlevel: No such file or directory
            busybox: /data/busybox/runsv: No such file or directory
            busybox: /data/busybox/runsvdir: No such file or directory
            busybox: /data/busybox/rx: No such file or directory
            busybox: /data/busybox/sed: No such file or directory
            busybox: /data/busybox/seq: No such file or directory
            busybox: /data/busybox/setarch: No such file or directory
            busybox: /data/busybox/setconsole: No such file or directory
            busybox: /data/busybox/setkeycodes: No such file or directory
            busybox: /data/busybox/setlogcons: No such file or directory
            busybox: /data/busybox/setsid: No such file or directory
            busybox: /data/busybox/setuidgid: No such file or directory
            busybox: /data/busybox/sh: No such file or directory
            busybox: /data/busybox/sha1sum: No such file or directory
            busybox: /data/busybox/slattach: No such file or directory
            busybox: /data/busybox/sleep: No such file or directory
            busybox: /data/busybox/softlimit: No such file or directory
            busybox: /data/busybox/sort: No such file or directory
            busybox: /data/busybox/split: No such file or directory
            busybox: /data/busybox/start-stop-daemon: No such file or directory
            busybox: /data/busybox/stat: No such file or directory
            busybox: /data/busybox/strings: No such file or directory
            busybox: /data/busybox/stty: No such file or directory
            busybox: /data/busybox/su: No such file or directory
            busybox: /data/busybox/sulogin: No such file or directory
            busybox: /data/busybox/sum: No such file or directory
            busybox: /data/busybox/sv: No such file or directory
            busybox: /data/busybox/svlogd: No such file or directory
            busybox: /data/busybox/swapoff: No such file or directory
            busybox: /data/busybox/swapon: No such file or directory
            busybox: /data/busybox/switch_root: No such file or directory
            busybox: /data/busybox/sync: No such file or directory
            busybox: /data/busybox/sysctl: No such file or directory
            busybox: /data/busybox/syslogd: No such file or directory
            busybox: /data/busybox/tail: No such file or directory
            busybox: /data/busybox/tar: No such file or directory
            busybox: /data/busybox/taskset: No such file or directory
            busybox: /data/busybox/tcpsvd: No such file or directory
            busybox: /data/busybox/tee: No such file or directory
            busybox: /data/busybox/telnet: No such file or directory
            busybox: /data/busybox/telnetd: No such file or directory
            busybox: /data/busybox/test: No such file or directory
            busybox: /data/busybox/tftp: No such file or directory
            busybox: /data/busybox/time: No such file or directory
            busybox: /data/busybox/top: No such file or directory
            busybox: /data/busybox/touch: No such file or directory
            busybox: /data/busybox/tr: No such file or directory
            busybox: /data/busybox/traceroute: No such file or directory
            busybox: /data/busybox/true: No such file or directory
            busybox: /data/busybox/tty: No such file or directory
            busybox: /data/busybox/ttysize: No such file or directory
            busybox: /data/busybox/udhcpc: No such file or directory
            busybox: /data/busybox/udhcpd: No such file or directory
            busybox: /data/busybox/udpsvd: No such file or directory
            busybox: /data/busybox/umount: No such file or directory
            busybox: /data/busybox/uname: No such file or directory
            busybox: /data/busybox/uncompress: No such file or directory
            busybox: /data/busybox/unexpand: No such file or directory
            busybox: /data/busybox/uniq: No such file or directory
            busybox: /data/busybox/unix2dos: No such file or directory
            busybox: /data/busybox/unlzma: No such file or directory
            busybox: /data/busybox/unzip: No such file or directory
            busybox: /data/busybox/uptime: No such file or directory
            busybox: /data/busybox/usleep: No such file or directory
            busybox: /data/busybox/uudecode: No such file or directory
            busybox: /data/busybox/uuencode: No such file or directory
            busybox: /data/busybox/vconfig: No such file or directory
            busybox: /data/busybox/vi: No such file or directory
            busybox: /data/busybox/vlock: No such file or directory
            busybox: /data/busybox/watch: No such file or directory
            busybox: /data/busybox/watchdog: No such file or directory
            busybox: /data/busybox/wc: No such file or directory
            busybox: /data/busybox/wget: No such file or directory
            busybox: /data/busybox/which: No such file or directory
            busybox: /data/busybox/who: No such file or directory
            busybox: /data/busybox/whoami: No such file or directory
            busybox: /data/busybox/xargs: No such file or directory
            busybox: /data/busybox/yes: No such file or directory
            busybox: /data/busybox/zcat: No such file or directory
            busybox: /data/busybox/zcip: No such file or directory
        6. 创建/data/busybox目录,给777权限,导入PATH:
            root@android:/data/local # mkdir /data/busybox 
            root@android:/data/local # chmod 777 /data/busybox
            root@android:/data/local # echo $PATH
            /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/data/busybox/
            root@android:/data/local # 
        7. 测试which可用:
            root@android:/data/busybox # ./which
            BusyBox v1.8.1 (2007-11-14 10:11:37 EST) multi-call binary

            Usage: which [COMMAND ...]

            Locate a COMMAND

            1|root@android:/data/busybox # 

六、输出结果:
    root@android:/data/busybox # runlmbench                                      
    ###############################
     LMBENCH MEASUREMENT
    ###############################
    262144+0 records in
    262144+0 records out
    134217728 bytes transferred in 13.776 secs (9742866 bytes/sec)
    [LMBENCH_VER 3.0-a9]
    [CPU: ]
    [Processors: 2]
    [OS: Linux localhost 3.0.35-g6774ed9-dirty #907 SMP PREEMPT Tue Aug 2 17:55:21 CST 2016 armv7l unknown]
    [BOARD: ]
    [PLATFORM: imx6]
    [HARDWARE: freescale]
    [ANDROID VER: 4.2.2]
    [KERNEL VER: ]
    [mhz: 995 MHz, 1.0050 nanosec clock]
    [MemTotal:         780300 kB]
    [MB for test: 128M]
    [ENOUGH: 5000]
    Simple syscall: 0.2757 microseconds
    Simple read: 0.7436 microseconds
    Simple write: 0.6949 microseconds
    Simple stat: 2.1404 microseconds
    Simple fstat: 0.6601 microseconds
    Simple open/close: 4.8364 microseconds
    Signal handler installation: 0.3585 microseconds
    Signal handler overhead: 2.9374 microseconds
    Protection fault: 1.0261 microseconds
    Pipe latency: 14.7370 microseconds
    Pipe bandwidth: 578.23 MB/sec
    AF_UNIX sock stream latency: 24.0603 microseconds
    AF_UNIX sock stream bandwidth: 644.49 MB/sec
    Process fork+exit: 478.2500 microseconds
    Process fork+execve: 496.3000 microseconds
    Process fork+/bin/sh -c: 511.5000 microseconds
    Procedure call: 0.0101 microseconds
    Pagefaults on /data/file.tmp: 2.7930 microseconds
    ------------------------------
    1. BANDWIDTH MEASUREMENT
    ------------------------------
    
    bw_file_rd
    ==========
    MB MB/s
    0.000512 64.28
    0.001024 121.46
    0.002048 226.82
    0.004096 380.00
    0.008192 384.49
    0.016384 459.90
    0.032768 430.53
    0.065536 435.18
    0.131072 444.07
    0.262144 433.85
    0.524288 348.36
    1.05 305.71
    2.10 299.46
    4.19 302.36
    8.39 301.19
    16.78 303.40
    33.55 302.28
    67.11 301.53
    134.22 311.41
    
    bw_mem
    ======
    MB MB/s
    
    memory read bandwidth
    ---------------------
    MB MB/s
    0.000512 11069.90
    0.001024 11840.93
    0.002048 12345.39
    0.004096 12611.07
    0.008192 12549.55
    0.016384 12658.47
    0.032768 4714.99
    0.065536 2294.66
    0.131072 1961.30
    0.262144 1883.22
    0.524288 1172.25
    1.05 568.85
    2.10 507.23
    4.19 501.71
    8.39 501.68
    16.78 502.00
    33.55 501.88
    67.11 502.17
    134.22 502.34
    
    memory write bandwidth
    ---------------------
    MB MB/s
    0.000512 11844.63
    0.001024 12273.09
    0.002048 12490.38
    0.004096 12613.38
    0.008192 12572.80
    0.016384 12572.38
    0.032768 4081.81
    0.065536 2556.62
    0.131072 2080.89
    0.262144 2049.49
    0.524288 1290.62
    1.05 458.63
    2.10 422.90
    4.19 426.99
    8.39 427.90
    16.78 428.73
    33.55 428.86
    67.11 429.02
    134.22 429.15
    
    bw_mmap_rd
    ==========
    MB MB/s
    
    mmap read bandwidth
    ---------------------
    MB MB/s
    0.000512 2950.66
    0.001024 3085.22
    0.002048 3138.08
    0.004096 3174.29
    0.008192 3133.86
    0.016384 3161.77
    0.032768 1812.75
    0.065536 996.43
    0.131072 897.27
    0.262144 882.14
    0.524288 628.27
    1.05 384.80
    2.10 359.84
    4.19 353.77
    8.39 356.51
    16.78 356.51
    33.55 356.83
    67.11 356.75
    134.22 356.78
    
    mmap read open2close bandwidth
    ---------------------
    MB MB/s
    0.000512 20.05
    0.001024 39.93
    0.002048 78.78
    0.004096 153.27
    0.008192 240.38
    0.016384 416.78
    0.032768 482.55
    0.065536 472.14
    0.131072 506.07
    0.262144 513.91
    0.524288 370.13
    1.05 293.23
    2.10 284.24
    4.19 284.77
    8.39 286.97
    16.78 287.18
    33.55 288.00
    67.11 287.57
    134.22 287.78
    ------------------------------
    2. LATENCY MEASUREMENTS
    ------------------------------
    
    lat_cmd
    ==========
    lat_cmd: 724.5556 microseconds
    lat_cmd: 784.7500 microseconds
    
    lat_mem_rd
    ==========
    "stride=128
    0.00049 4.446
    0.00098 4.528
    0.00195 4.666
    0.00293 4.546
    0.00391 4.576
    0.00586 4.447
    0.00781 4.473
    0.01172 4.470
    0.01562 4.523
    0.02344 4.470
    0.03125 19.277
    0.04688 22.169
    0.06250 28.072
    0.09375 34.498
    0.12500 36.779
    0.18750 38.253
    0.25000 38.928
    0.37500 45.304
    0.50000 70.303
    0.75000 106.495
    1.00000 130.767
    1.50000 144.957
    2.00000 145.493
    3.00000 144.752
    4.00000 151.140
    6.00000 147.697
    8.00000 143.338
    
    lat_mmap
    ==========
    MB usecs
    1.048576 47
    2.097152 73
    4.194304 128
    8.388608 251
    16.777216 497
    33.554432 978
    67.108864 6685
    134.217728 267039
    
    lat_ops
    ==========
    integer bit: 1.13 nanoseconds
    integer add: 1.03 nanoseconds
    integer mul: 4.85 nanoseconds
    integer div: 83.28 nanoseconds
    integer mod: 26.31 nanoseconds
    int64 bit: 2.07 nanoseconds
    uint64 add: 4.25 nanoseconds
    int64 mul: 15.15 nanoseconds
    int64 div: 281.46 nanoseconds
    int64 mod: 157.47 nanoseconds
    float add: 4.09 nanoseconds
    float mul: 6.05 nanoseconds
    float div: 16.02 nanoseconds
    double add: 4.09 nanoseconds
    double mul: 7.06 nanoseconds
    double div: 26.10 nanoseconds
    float bogomflops: 15.13 nanoseconds
    double bogomflops: 27.08 nanoseconds
    
    lat_usleep
    ==========
    usleep 10 microseconds: 107.4792 microseconds
    usleep 100 microseconds: 163.6364 microseconds
    usleep 1000 microseconds: 1073.0826 microseconds
    nanosleep 10 microseconds: 104.8627 microseconds
    nanosleep 100 microseconds: 165.7500 microseconds
    nanosleep 1000 microseconds: 1068.5000 microseconds
    select 10 microseconds: 109.9130 microseconds
    select 100 microseconds: 164.8750 microseconds
    select 1000 microseconds: 1081.1441 microseconds
    itimer 10 microseconds: 63.0148 microseconds
    itimer 100 microseconds: 123.6591 microseconds
    itimer 1000 microseconds: 1025.8333 microseconds
    
    lat_fs
    ==========
    size of file, number created, creations per second, removals per second
    0k      21622   16174   14938
    1k      12412   9337    4065
    4k      14594   2913    6560
    10k     10341   914     5631
    
    lat_ctx
    ==========
    size, ovr: non-context switching overhead(usec)
    number of processes, cost of context switch(usec)
    
    "size=0k ovr=6.23
    2 8.24
    
    "size=0k ovr=6.21
    4 8.65
    
    "size=0k ovr=6.16
    8 9.36
    
    "size=0k ovr=6.04
    16 10.75
    
    "size=0k ovr=5.87
    20 10.83
    
    "size=128k ovr=214.22
    2 42.49
    
    "size=128k ovr=202.56
    4 184.57
    
    "size=128k ovr=208.57
    8 220.67
    
    "size=128k ovr=181.71
    16 260.47
    
    "size=128k ovr=187.81
    20 252.39
    ------------------------------
    3. OTHER MEASUREMENTS
    ------------------------------
    
    par_ops
    ---------------------
    0.004096 5.26
    0.008192 9.78
    0.016384 3.54
    0.032768 4.94
    0.065536 3.88
    0.131072 4.40
    0.262144 13.71
    0.524288 3.84
    
    
    stream
    ---------------------
    STREAM copy latency: 10.44 nanoseconds
    STREAM copy bandwidth: 1532.93 MB/sec
    STREAM scale latency: 15.34 nanoseconds
    STREAM scale bandwidth: 1042.70 MB/sec
    STREAM add latency: 18.25 nanoseconds
    STREAM add bandwidth: 1315.31 MB/sec
    STREAM triad latency: 20.41 nanoseconds
    STREAM triad bandwidth: 1176.04 MB/sec
    
    tlb
    ---------------------
    tlb: 33 pages
    
    cache
    ---------------------
    ......
    L1 cache: 32768 bytes 4.48 nanoseconds 64 linesize 3.95 parallelism
    Memory latency: 187.58 nanoseconds 2.01 parallelism
    root@android:/data/busybox # 

 

posted on 2016-08-03 09:52  zengjf  阅读(2274)  评论(0编辑  收藏  举报

导航