change: update docs

This commit is contained in:
徐聪
2022-07-25 21:29:19 +08:00
parent 848d72fe3a
commit 0b60b7a507
14 changed files with 93 additions and 66 deletions
+4 -1
View File
@@ -208,6 +208,7 @@ func (b *HRPBoomer) runTestCases(testCases []*TCase, profile *boomer.Profile) {
testcases = append(testcases, tesecase)
}
b.SetProfile(profile)
b.InitBoomer()
log.Info().Interface("testcases", testcases).Interface("profile", profile).Msg("run tasks successful")
@@ -222,7 +223,7 @@ func (b *HRPBoomer) rebalanceBoomer(profile *boomer.Profile) {
log.Info().Interface("profile", profile).Msg("rebalance tasks successful")
}
func (b *HRPBoomer) PollTasks() {
func (b *HRPBoomer) PollTasks(ctx context.Context) {
for {
select {
case task := <-b.Boomer.GetTasksChan():
@@ -240,6 +241,8 @@ func (b *HRPBoomer) PollTasks() {
case <-b.Boomer.GetCloseChan():
return
case <-ctx.Done():
return
}
}
}