[lxc-devel] [lxd/master] Tweaks to perf.sh test

stgraber on Github lxc-bot at linuxcontainers.org
Thu Sep 7 22:49:16 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170907/c8d35e26/attachment.bin>
-------------- next part --------------
From 8c1e1b4384eb9e8bc8cda46da251e4a6cf920fbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 7 Sep 2017 18:47:18 -0400
Subject: [PATCH 1/2] tests: Add support for LXD_TMPFS to perf.sh
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 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/perf.sh b/test/perf.sh
index ab9b76551..8f4a34e97 100755
--- a/test/perf.sh
+++ b/test/perf.sh
@@ -56,6 +56,11 @@ trap cleanup EXIT HUP INT TERM
 
 # Setup test directories
 TEST_DIR=$(mktemp -d -p "$(pwd)" tmp.XXX)
+
+if [ -n "${LXD_TMPFS:-}" ]; then
+  mount -t tmpfs tmpfs "${TEST_DIR}" -o mode=0751
+fi
+
 LXD_DIR=$(mktemp -d -p "${TEST_DIR}" XXX)
 export LXD_DIR
 chmod +x "${TEST_DIR}" "${LXD_DIR}"

From 1151195b5b59c80a502748e9aee1790815a8e6ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 7 Sep 2017 18:47:31 -0400
Subject: [PATCH 2/2] tests: Also measure batch startup time in perf.sh
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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/perf.sh b/test/perf.sh
index 8f4a34e97..6cbab278b 100755
--- a/test/perf.sh
+++ b/test/perf.sh
@@ -81,6 +81,7 @@ 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" spawn --count 128 --start=false
+run_benchmark "start-128" "start 128 containers" start --count 128
 run_benchmark "delete-128" "delete 128 containers" delete
 
 # shellcheck disable=SC2034


More information about the lxc-devel mailing list