diff options
author | MatthewLi <matthew.lijun@huawei.com> | 2016-09-14 03:18:19 -0400 |
---|---|---|
committer | MatthewLi <matthew.lijun@huawei.com> | 2016-09-17 22:41:13 -0400 |
commit | 1dd6bfacd9eb90f74d85a764275b0c912c44dff3 (patch) | |
tree | 89ebe591594993f52b03d892ad910a6e9f20e31c /yardstick | |
parent | d38d993ec1515cade15372592cd33becb810c67a (diff) |
compute capacity description adjustment and HT check added
JIRA: YARDSTICK-270
1)description info amended according to really tested
2)hyper-thread status check added
Change-Id: I813a41ff1e55c2d816fa55b773cf6c4bdd2af2bd
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'yardstick')
-rw-r--r-- | yardstick/benchmark/scenarios/compute/computecapacity.bash | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/yardstick/benchmark/scenarios/compute/computecapacity.bash b/yardstick/benchmark/scenarios/compute/computecapacity.bash index 98d4b8fb5..68741a94f 100644 --- a/yardstick/benchmark/scenarios/compute/computecapacity.bash +++ b/yardstick/benchmark/scenarios/compute/computecapacity.bash @@ -9,13 +9,15 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -# Measure compute capacity and scale of a host +# compute capacity and scale of a host set -e # run capacity test run_capacity() { + #parameter used for HT(Hyper-Thread) check + HT_Para=2 # Number of CPUs CPU=$(grep 'physical id' /proc/cpuinfo | sort -u | wc -l) # Number of physical cores in a single CPU @@ -31,6 +33,12 @@ run_capacity() CACHE=$(grep 'cache size' /proc/cpuinfo | sort -u) CA=$(echo $CACHE | awk '/ /{printf "%s", $4}') CACHES=$[$CA * $CPU] + HT_Value=$[$HT_Para * $CORES] + if [ $HT_Value -eq $THREAD ]; then + HT_OPEN=1 + else + HT_OPEN=0 + fi } # write the result to stdout in json format @@ -41,7 +49,8 @@ output_json() \"Core_number\":\"$CORES\", \ \"Thread_number\":\"$THREAD\", \ \"Memory_size\": \"$ME\", \ - \"Cache_size\": \"$CACHES KB\" \ + \"Cache_size\": \"$CACHES KB\", \ + \"HT_Open\": \"$HT_OPEN\" \ }" } |