Skip to content

Commit cfde081

Browse files
committed
Improve go client logging
1 parent 5f5cb80 commit cfde081

File tree

1 file changed

+11
-4
lines changed
  • src/BenchmarksApps/Grpc/GoClient

1 file changed

+11
-4
lines changed

src/BenchmarksApps/Grpc/GoClient/main.go

+11-4
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,23 @@ func main() {
9191

9292
// Start background thread to track warmup and duration
9393
go func() {
94+
warmup := time.Duration(*warmup) * time.Second
95+
fmt.Printf("Warming up for %v\n", warmup)
9496
warmingUp = true
9597
warmupWg.Add(1)
96-
time.Sleep(time.Duration(*warmup) * time.Second)
98+
time.Sleep(warmup)
99+
100+
fmt.Print("Finished warming up\n")
97101
warmingUp = false
98102
warmupWg.Done()
99-
fmt.Print("Finished warming up\n")
100-
time.Sleep(time.Duration(*duration) * time.Second)
103+
104+
duration := time.Duration(*duration) * time.Second
105+
fmt.Printf("Running for %v\n", duration)
106+
time.Sleep(duration)
107+
108+
fmt.Print("Stopping benchmarks\n")
101109
stopped = true
102110
cancel()
103-
fmt.Print("Stopping benchmarks\n")
104111
}()
105112

106113
// Start caller threads for each connection + stream

0 commit comments

Comments
 (0)