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
This commit is contained in:
parent
09c1318294
commit
7d0a37dfb1
@ -64,8 +64,9 @@
|
|||||||
the right output is a long string of 4000 characters containing
|
the right output is a long string of 4000 characters containing
|
||||||
'r', 'i', 'a', 't' in random order (because async).
|
'r', 'i', 'a', 't' in random order (because async).
|
||||||
|
|
||||||
After that are three aggregate uuids, and then the output
|
After that are three aggregate uuids, timing information for the
|
||||||
of two timed curl requests.
|
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
|
If no timed requests are present it means that the expected number
|
||||||
of resource providers were not created. At this time, only resource
|
of resource providers were not created. At this time, only resource
|
||||||
@ -100,18 +101,20 @@
|
|||||||
# get placement endpoint
|
# get placement endpoint
|
||||||
placement_url="http://localhost:8000"
|
placement_url="http://localhost:8000"
|
||||||
|
|
||||||
|
set +x
|
||||||
# load with placeload
|
# load with placeload
|
||||||
(
|
(
|
||||||
echo "$EXPLANATION"
|
echo "$EXPLANATION"
|
||||||
# preheat the aggregates to avoid https://bugs.launchpad.net/nova/+bug/1804453
|
# preheat the aggregates to avoid https://bugs.launchpad.net/nova/+bug/1804453
|
||||||
placeload $placement_url 10
|
placeload $placement_url 10
|
||||||
placeload $placement_url $COUNT
|
echo "##### TIMING placeload creating $COUNT resource providers with inventory, aggregates and traits."
|
||||||
) | tee -a $LOG
|
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"')
|
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
|
# Skip curl and note if we failed to create the required number of rps
|
||||||
if [[ $rp_count -ge $COUNT ]]; then
|
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
|
||||||
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
|
) 2>&1 | tee -a $LOG
|
||||||
@ -122,6 +125,7 @@
|
|||||||
) | tee -a $LOG
|
) | tee -a $LOG
|
||||||
code=1
|
code=1
|
||||||
fi
|
fi
|
||||||
|
set -x
|
||||||
deactivate
|
deactivate
|
||||||
exit $code
|
exit $code
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user