From 7d0a37dfb1f93ba49569610cabb583c3c47c3e09 Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Wed, 2 Jan 2019 18:33:09 +0000 Subject: [PATCH] Also time placeload when doing perfload The previous iteration was only timing how long it took to GET some resource providers after we create 1000 of them. It's also useful to know how long it takes to create them. Neither of these timings are robust because we do not have reliable sameness from virtual machine to virtual machine (especially between cloud providers) but they make it possible to become aware of unusual circumstances. To avoid extraneous noise in the placement-perf.txt file, set +x and set -x surrounds the commands that create that output. Change-Id: I4da2703dc4e8b306d004ac092d436d85669caf0f --- playbooks/perfload.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/playbooks/perfload.yaml b/playbooks/perfload.yaml index 46a59cc15..8bf995f01 100644 --- a/playbooks/perfload.yaml +++ b/playbooks/perfload.yaml @@ -64,8 +64,9 @@ the right output is a long string of 4000 characters containing 'r', 'i', 'a', 't' in random order (because async). - After that are three aggregate uuids, and then the output - of two timed curl requests. + After that are three aggregate uuids, timing information for the + placeload run, and then timing information for two identical curl + requests for allocation candidates. If no timed requests are present it means that the expected number of resource providers were not created. At this time, only resource @@ -100,18 +101,20 @@ # get placement endpoint placement_url="http://localhost:8000" + set +x # load with placeload ( echo "$EXPLANATION" # preheat the aggregates to avoid https://bugs.launchpad.net/nova/+bug/1804453 placeload $placement_url 10 - placeload $placement_url $COUNT - ) | tee -a $LOG + echo "##### TIMING placeload creating $COUNT resource providers with inventory, aggregates and traits." + time placeload $placement_url $COUNT + ) 2>&1 | tee -a $LOG rp_count=$(curl -H 'x-auth-token: admin' $placement_url/resource_providers |json_pp|grep -c '"name"') # Skip curl and note if we failed to create the required number of rps if [[ $rp_count -ge $COUNT ]]; then ( - echo '##### TIMING GET /allocation_candidates' + echo "##### TIMING GET /allocation_candidates?${PLACEMENT_QUERY} twice" time curl -s -H 'x-auth-token: admin' -H 'openstack-api-version: placement 1.21' "$placement_url/allocation_candidates?${PLACEMENT_QUERY}" > /dev/null time curl -s -H 'x-auth-token: admin' -H 'openstack-api-version: placement 1.21' "$placement_url/allocation_candidates?${PLACEMENT_QUERY}" > /dev/null ) 2>&1 | tee -a $LOG @@ -122,6 +125,7 @@ ) | tee -a $LOG code=1 fi + set -x deactivate exit $code }