File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import (
14
14
"log"
15
15
"math"
16
16
"math/rand"
17
+ "net/http"
17
18
"os"
18
19
"os/signal"
19
20
"sync"
@@ -72,6 +73,7 @@ var producerCmd = &cobra.Command{
72
73
loop , _ := cmd .Flags ().GetBool ("loop" )
73
74
readBufferEachConn , _ := cmd .Flags ().GetInt ("read-buffer-each-conn" )
74
75
writeBufferEachConn , _ := cmd .Flags ().GetInt ("write-buffer-each-conn" )
76
+ pprofPort , _ := cmd .Flags ().GetInt64 ("pprof-port" )
75
77
76
78
if nClients > uint64 (keyspaceLen ) {
77
79
log .Fatalf ("The number of clients needs to be smaller or equal to the number of streams" )
@@ -83,6 +85,10 @@ var producerCmd = &cobra.Command{
83
85
// a WaitGroup for the goroutines to tell us they've stopped
84
86
wg := sync.WaitGroup {}
85
87
88
+ go func () {
89
+ http .ListenAndServe (fmt .Sprintf (":%d" , pprofPort ), nil )
90
+ }()
91
+
86
92
fmt .Printf ("Using random seed: %d. Each client will have seed of %d+<client id>\n " , seed , seed )
87
93
88
94
var requestRate = Inf
You can’t perform that action at this time.
0 commit comments