Skip to content

Commit

Permalink
added log messages about read and write RPS
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Oct 2, 2024
1 parent 6fb3f52 commit d7525b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/slo/native/query/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os/signal"
"strconv"
"sync"
"syscall"
"time"
Expand Down Expand Up @@ -127,12 +128,14 @@ func main() {
for i := 0; i < cfg.ReadRPS; i++ {
go w.Read(ctx, &wg, readRL)
}
log.Println("started " + strconv.Itoa(cfg.ReadRPS) + " read workers")

writeRL := rate.NewLimiter(rate.Limit(cfg.WriteRPS), 1)
wg.Add(cfg.WriteRPS)
for i := 0; i < cfg.WriteRPS; i++ {
go w.Write(ctx, &wg, writeRL, gen)
}
log.Println("started " + strconv.Itoa(cfg.ReadRPS) + " write workers")

metricsRL := rate.NewLimiter(rate.Every(time.Duration(cfg.ReportPeriod)*time.Millisecond), 1)
wg.Add(1)
Expand Down

0 comments on commit d7525b8

Please sign in to comment.