diff options
author | Ng Zhi An <zhin@google.com> | 2018-03-29 14:18:59 -0700 |
---|---|---|
committer | Ng Zhi An <zhin@google.com> | 2018-03-30 10:51:53 -0700 |
commit | 27a16b1a541bbf06a30f0307d4b988ef630a4b9b (patch) | |
tree | 20769579e544c90a7299ffa43cd419abae36db90 | |
parent | 0c66d69c8f80d10f50c9cce4a3aa0e1e88f20d6f (diff) | |
download | extras-27a16b1a541bbf06a30f0307d4b988ef630a4b9b.tar.gz |
Change to /bin/bash and clean up fgrep
Test: manual, run app-launcher
Change-Id: I9811ecfc6f2adfc704c27a973dcfde4811119e1f
-rwxr-xr-x | app-launcher/app-launcher | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app-launcher/app-launcher b/app-launcher/app-launcher index 9f4678a7..77eaae9e 100755 --- a/app-launcher/app-launcher +++ b/app-launcher/app-launcher @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash parseoptions() { verbose=false @@ -59,47 +59,47 @@ getstats () { # From Activity Manager echo "Launch Time (TotalTime) :" - fgrep TotalTime "$infile" | awk '{print $2}' | computestats + grep -F TotalTime "$infile" | awk '{print $2}' | computestats # Data from simpleperf echo "cpu-cycles :" - fgrep cpu-cycles "$infile" | awk '{print $1}' | sed s/,//g | computestats + grep -F cpu-cycles "$infile" | awk '{print $1}' | sed s/,//g | computestats # CPU util% Data from /proc/stat echo "cpu-util% :" - fgrep 'Total CPU util' "$infile" | awk '{print $5}' | computestatsf + grep -F 'Total CPU util' "$infile" | awk '{print $5}' | computestatsf echo "user-cpu-util% :" - fgrep 'User CPU util' "$infile" | awk '{print $5}' | computestatsf + grep -F 'User CPU util' "$infile" | awk '{print $5}' | computestatsf echo "sys-cpu-util% (incl hardirq/softirq) :" - fgrep 'Sys CPU util' "$infile" | awk '{print $5}' | computestatsf + grep -F 'Sys CPU util' "$infile" | awk '{print $5}' | computestatsf if [ $verbose == true ]; then echo "instructions : " - fgrep instructions "$infile" | awk '{print $1}' | sed s/,//g | computestats + grep -F instructions "$infile" | awk '{print $1}' | sed s/,//g | computestats echo "cycles per instruction : " - fgrep instructions "$infile" | awk '{print $4}' | sed s/,//g | computestatsf + grep -F instructions "$infile" | awk '{print $4}' | sed s/,//g | computestatsf echo "branch-misses : " - fgrep branch-misses "$infile" | awk '{print $1}' | sed s/,//g | computestats + grep -F branch-misses "$infile" | awk '{print $1}' | sed s/,//g | computestats echo "context-switches : " - fgrep context-switches "$infile" | awk '{print $1}' | sed s/,//g | computestats + grep -F context-switches "$infile" | awk '{print $1}' | sed s/,//g | computestats echo "page-faults : " - fgrep page-faults "$infile" | awk '{print $1}' | sed s/,//g | computestats + grep -F page-faults "$infile" | awk '{print $1}' | sed s/,//g | computestats fi if [ "$system_bdev_set" == true ]; then # (Storage) Data from /proc we've collected echo "KB read for $system_block_device blkdev :" - fgrep KB "$infile" | grep system | awk '{print $5}' | computestats + grep -F KB "$infile" | grep system | awk '{print $5}' | computestats echo "iowait% :" - fgrep IOwait "$infile" | awk '{print $3}' | computestatsf + grep -F IOwait "$infile" | awk '{print $3}' | computestatsf echo "Device util% for $system_block_device blkdev :" - fgrep 'Device util' "$infile" | awk '{print $4}' | computestatsf + grep -F 'Device util' "$infile" | awk '{print $4}' | computestatsf fi } |