From 9578a37a816b1e3e08d271a980da1a9f25eeb507 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 4 Sep 2018 23:53:47 +0000 Subject: [PATCH] add duration support in txgen Signed-off-by: Leo Chen --- client/txgen/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/txgen/main.go b/client/txgen/main.go index 16fa939e2..4944f0184 100644 --- a/client/txgen/main.go +++ b/client/txgen/main.go @@ -243,6 +243,7 @@ func main() { maxNumTxsPerBatch := flag.Int("max_num_txs_per_batch", 100000, "number of transactions to send per message") logFolder := flag.String("log_folder", "latest", "the folder collecting the logs of this execution") numSubset := flag.Int("numSubset", 3, "the number of subsets of utxos to process separately") + duration := flag.Int("duration", 60, "duration of the tx generation in second") flag.Parse() // Read the configs @@ -310,7 +311,7 @@ func main() { // Transaction generation process time.Sleep(10 * time.Second) // wait for nodes to be ready start := time.Now() - totalTime := 60.0 //run for 1 minutes + totalTime := float64(*duration) batchCounter := 0 for true {