aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 22:18:27 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 22:18:27 +0200
commite0bb1553d51e8791b3ec1a7915f26cc4cffbcbb4 (patch)
tree94c3095c4456a513516df0a91ff60a4348fd756a /main.go
parentf6c1eb7e58a5fc70e720311482f8147b791e6104 (diff)
Minor edit
Diffstat (limited to 'main.go')
-rw-r--r--main.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.go b/main.go
index 93f5348..98fd446 100644
--- a/main.go
+++ b/main.go
@@ -238,6 +238,7 @@ func generatorMetrics(ctx context.Context, opts options.Options, nextLine *line.
case <-metrics.C:
currLine := nextLine.Num()
now := time.Now().Unix()
+
str := fmt.Sprintf(" Current rate: %.1f sites/s\n", float64(currLine-prevLine)/float64(now-prevTime))
str += fmt.Sprintf(" Average rate: %.1f sites/s\n", float64(currLine)/float64(now-startTime))
str += fmt.Sprintf(" Next line: %d", currLine)