[lxc-devel] [lxd/master] lxd-benchmark: Show times per container

simos on Github lxc-bot at linuxcontainers.org
Wed Sep 27 16:13:01 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 396 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170927/c2d5b658/attachment.bin>
-------------- next part --------------
From 0e931cfc9b42450d1077fad832f40a028f7a1800 Mon Sep 17 00:00:00 2001
From: Simos Xenitellis <simos at users.noreply.github.com>
Date: Wed, 27 Sep 2017 19:09:40 +0300
Subject: [PATCH] lxd-benchmark: Show times per container

Shows the duration per container of a batch container task.
---
 lxd-benchmark/benchmark/batch.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd-benchmark/benchmark/batch.go b/lxd-benchmark/benchmark/batch.go
index 0e2399480..59e1315c7 100644
--- a/lxd-benchmark/benchmark/batch.go
+++ b/lxd-benchmark/benchmark/batch.go
@@ -41,7 +41,7 @@ func processBatch(count int, batchSize int, process func(index int, wg *sync.Wai
 
 		if processed >= nextStat {
 			interval := time.Since(timeStart).Seconds()
-			logf("Processed %d containers in %.3fs (%.3f/s)", processed, interval, float64(processed)/interval)
+			logf("Processed %d containers in %.3fs (%.3fs per container)", processed, interval, interval/float64(processed))
 			nextStat = nextStat * 2
 		}
 


More information about the lxc-devel mailing list