[lxc-devel] [lxd/master] tests: Fix perf.sh after lxd-benchmark changes
stgraber on Github
lxc-bot at linuxcontainers.org
Sun Feb 25 02:04:15 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180225/035561a3/attachment.bin>
-------------- next part --------------
From ea28c1575ef263e21beb51387de4159716e371aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Sat, 24 Feb 2018 21:03:58 -0500
Subject: [PATCH] tests: Fix perf.sh after lxd-benchmark changes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
test/perf.sh | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/test/perf.sh b/test/perf.sh
index 6cbfd1b13..995db3bf4 100755
--- a/test/perf.sh
+++ b/test/perf.sh
@@ -25,28 +25,21 @@ log_message() {
run_benchmark() {
# shellcheck disable=SC2039
- local label description opts
+ local label description
label="$1"
description="$2"
shift 2
log_message "Benchmark start: $label - $description"
- lxd_benchmark "$@" --report-file "$PERF_LOG_CSV" --report-label "$label"
+ lxd-benchmark "$@" --report-file "$PERF_LOG_CSV" --report-label "$label"
log_message "Benchmark completed: $label"
}
-lxd_benchmark() {
- # shellcheck disable=SC2039
- local opts
- [ "${LXD_TEST_IMAGE:-}" ] && opts="--image $LXD_TEST_IMAGE" || opts=""
- lxd-benchmark "$@" $opts
-}
-
cleanup() {
if [ "$TEST_RESULT" != "success" ]; then
rm -f "$PERF_LOG_CSV"
fi
- lxd_benchmark delete # ensure all test containers have been deleted
+ lxd-benchmark delete # ensure all test containers have been deleted
kill_lxd "$LXD_DIR"
cleanup_lxds "$TEST_DIR"
log_message "Performance tests result: $TEST_RESULT"
@@ -77,11 +70,11 @@ ensure_import_testimage
# shellcheck disable=SC2034
TEST_RESULT=failure
-run_benchmark "create-one" "create 1 container" launch --count 1 --start=false --image=testimage
+run_benchmark "create-one" "create 1 container" init --count 1 "${LXD_TEST_IMAGE:-"testimage"}"
run_benchmark "start-one" "start 1 container" start
run_benchmark "stop-one" "stop 1 container" stop
run_benchmark "delete-one" "delete 1 container" delete
-run_benchmark "create-128" "create 128 containers" launch --count 128 --start=false --image=testimage
+run_benchmark "create-128" "create 128 containers" init --count 128 "${LXD_TEST_IMAGE:-"testimage"}"
run_benchmark "start-128" "start 128 containers" start
run_benchmark "delete-128" "delete 128 containers" delete
More information about the lxc-devel
mailing list