File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
pkg/coordinator/tasks/tx_pool_throughput_analysis Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -133,11 +133,15 @@ func (t *Task) Execute(ctx context.Context) error {
133133 rate := vegeta.Rate {Freq : t .config .QPS , Per : time .Second }
134134 pacer := vegeta.ConstantPacer {Freq : rate .Freq , Per : rate .Per }
135135
136- // Attack for 1 second duration
137- duration := time .Second
138- results := attacker .Attack (targeter , pacer , duration , "tx_attack" )
136+ // Attack with vegeta
137+ var metrics vegeta.Metrics
138+ for res := range attacker .Attack (targeter , pacer , duration , "tx_attack" ) {
139+ metrics .Add (res )
140+ }
141+ metrics .Close ()
142+ fmt .Printf ("99th percentile: %s\n " , metrics .Latencies .P99 )
139143
140- // Process results
144+ // Process results -- todo
141145 done := make (chan bool )
142146 go func () {
143147 defer close (done )
You can’t perform that action at this time.
0 commit comments