From 614364bc76dbf02fe8b1f674bd0cb0494c538ee2 Mon Sep 17 00:00:00 2001 From: rogerwelin Date: Tue, 9 Feb 2021 00:19:54 +0100 Subject: [PATCH] bugfix --- pkg/client/load.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/client/load.go b/pkg/client/load.go index 1259ea3..9c75461 100644 --- a/pkg/client/load.go +++ b/pkg/client/load.go @@ -193,6 +193,9 @@ func (c *Cassowary) Coordinate() (ResultMetrics, error) { durationMS := c.Duration * 1000 nextTick := durationMS / c.Requests ticker := time.NewTicker(time.Duration(nextTick) * time.Millisecond) + if nextTick == 0 { + log.Fatalf("The combination of %v requests and %v(s) duration is invalid. Try raising the duration to a greater value", c.Requests, c.Duration) + } done := make(chan bool) iter := 0