summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-08-26 01:14:25 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-26 01:14:25 +0000
commit7f46ed48c51dde7b11502ebac482536048b70177 (patch)
treeb3bf68b7ed49f2ae76d4d193da1eec86e03d1cdf
parenta89e7fa4bf0bf8034daa529dfb70335c2dc6c0e5 (diff)
parentcdf76b78abc004fb375fe08e4465abe8f137721e (diff)
Merge "improve tc055 results"
-rw-r--r--yardstick/benchmark/scenarios/compute/computecapacity.bash13
1 files changed, 6 insertions, 7 deletions
diff --git a/yardstick/benchmark/scenarios/compute/computecapacity.bash b/yardstick/benchmark/scenarios/compute/computecapacity.bash
index 68741a94f..d49638fe3 100644
--- a/yardstick/benchmark/scenarios/compute/computecapacity.bash
+++ b/yardstick/benchmark/scenarios/compute/computecapacity.bash
@@ -27,12 +27,11 @@ run_capacity()
# Number of logical cores
THREAD=$(grep 'processor' /proc/cpuinfo | sort -u | wc -l)
# Total memory size
- MEMORY=$(grep 'MemTotal' /proc/meminfo | sort -u)
- ME=$(echo $MEMORY | awk '/ /{printf "%s %s", $2, $3}')
+ MEMORY=$(grep 'MemTotal' /proc/meminfo | sort -u | awk '{print $2}')
+
# Cache size per CPU
- CACHE=$(grep 'cache size' /proc/cpuinfo | sort -u)
- CA=$(echo $CACHE | awk '/ /{printf "%s", $4}')
- CACHES=$[$CA * $CPU]
+ CACHE=$(grep 'cache size' /proc/cpuinfo | sort -u | awk '{print $4}')
+ CACHES=$[$CACHE * $CPU]
HT_Value=$[$HT_Para * $CORES]
if [ $HT_Value -eq $THREAD ]; then
HT_OPEN=1
@@ -48,8 +47,8 @@ output_json()
\"Cpu_number\":\"$CPU\", \
\"Core_number\":\"$CORES\", \
\"Thread_number\":\"$THREAD\", \
- \"Memory_size\": \"$ME\", \
- \"Cache_size\": \"$CACHES KB\", \
+ \"Memory_size\": \"$MEMORY\", \
+ \"Cache_size\": \"$CACHES\", \
\"HT_Open\": \"$HT_OPEN\" \
}"
}