aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2013-09-30 17:02:22 +0800
committerFengguang Wu <fengguang.wu@intel.com>2013-09-30 17:30:45 +0800
commit025398a6443fcbb9c1d151fa38ba414ebd2e7a6a (patch)
treeb1d8a02891646706c1753740081716fe7cfcafb5
parent1ca8f631483e9eea3ff4d2035fcb0b29833597b3 (diff)
downloadvm-scalability-025398a6443fcbb9c1d151fa38ba414ebd2e7a6a.tar.gz
case-remap: show throughput
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rwxr-xr-xcase-remap10
1 files changed, 10 insertions, 0 deletions
diff --git a/case-remap b/case-remap
index 6f189b2..c5e65a5 100755
--- a/case-remap
+++ b/case-remap
@@ -8,6 +8,9 @@ source ./hw_vars
USEMEM_REMAP=./usemem_remap
+start_time=$(date +%s%N)
+start_time=${start_time%???}
+
for i in $(seq $nr_cpu)
do
create_sparse_file $SPARSE_FILE-$i $((mem / nr_cpu / 2))
@@ -15,4 +18,11 @@ do
done
wait
+now=$(date +%s%N)
+now=${now%???}
+(( usecs = now - start_time ))
+
+throughput=$((mem / 2 / usecs))
+echo "$((mem / 2)) bytes remapped, $usecs usecs, $throughput MB/s"
+
rm $SPARSE_FILE-*