refactor: fork boomer as sub module

This commit is contained in:
debugtalk
2021-12-21 20:52:48 +08:00
parent f11310a8bd
commit a845b58ff5
20 changed files with 2329 additions and 45 deletions

View File

@@ -3,12 +3,11 @@ package hrp
import (
"time"
"github.com/myzhan/boomer"
"github.com/httprunner/hrp/internal/boomer"
"github.com/httprunner/hrp/internal/ga"
)
func NewStandaloneBoomer(spawnCount int, spawnRate float64) *hrpBoomer {
func NewBoomer(spawnCount int, spawnRate float64) *hrpBoomer {
b := &hrpBoomer{
Boomer: boomer.NewStandaloneBoomer(spawnCount, spawnRate),
debug: false,
@@ -50,11 +49,6 @@ func (b *hrpBoomer) Run(testcases ...ITestCase) {
b.Boomer.Run(taskSlice...)
}
// Quit stops running load test.
func (b *hrpBoomer) Quit() {
b.Boomer.Quit()
}
func (b *hrpBoomer) convertBoomerTask(testcase *TestCase) *boomer.Task {
config := testcase.Config.ToStruct()
return &boomer.Task{