Skip to content

Commit

Permalink
fix : attack go test
Browse files Browse the repository at this point in the history
  • Loading branch information
seipan committed Sep 22, 2023
1 parent dfe5d4e commit 263e995
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lib/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
package lib

import (
"log"
"time"

vegeta "github.com/tsenart/vegeta/lib"
Expand All @@ -36,7 +35,6 @@ func (atk *Attacker) Attack() vegeta.Metrics {
Body: atk.Body,
Header: atk.Header,
}
log.Println(target)
targeter := vegeta.NewStaticTargeter(target)
rate := vegeta.Rate{Freq: atk.Frequency, Per: time.Second}

Expand Down
4 changes: 3 additions & 1 deletion lib/attack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package lib

import (
"fmt"
"testing"
)

Expand All @@ -41,6 +42,7 @@ func TestAttack(t *testing.T) {
Frequency: 10,
Duration: 1,
}
atk.Attack()
metrics := atk.Attack()
fmt.Printf("99th percentile: %s\n", metrics.Latencies.P99)
})
}

0 comments on commit 263e995

Please sign in to comment.