Skip to content

Commit

Permalink
Merge pull request #400 from isucon/fix/go-json
Browse files Browse the repository at this point in the history
RunViolationCheckerとめる, icon取得数を制限
  • Loading branch information
fujiwara authored Nov 24, 2023
2 parents 5a8617d + d366cf7 commit db94374
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bench/cmd/bench/benchmarker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/isucon/isucandar/agent"
"github.com/isucon/isucandar/score"
"github.com/isucon/isucon13/bench/internal/bencherror"
"github.com/isucon/isucon13/bench/internal/benchscore"
"github.com/isucon/isucon13/bench/internal/config"
"github.com/isucon/isucon13/bench/internal/scheduler"
Expand Down Expand Up @@ -352,7 +351,7 @@ func (b *benchmarker) run(ctx context.Context) error {

b.runClientProviders(ctx)

violateCh := bencherror.RunViolationChecker(ctx)
violateCh := make(chan error) // とめておく bencherror.RunViolationChecker(ctx)

loadAttackHTTPClient := b.loadAttackHTTPClient()
// FIXME: LIMITは負荷をみて調整したい
Expand Down
5 changes: 4 additions & 1 deletion bench/scenario/viewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ func BasicViewerScenario(
lgr.Warnf("view: failed to get livecomments: %s\n", err.Error())
continue
} else {
for _, comment := range comments {
for i, comment := range comments {
client.GetIcon(ctx, comment.User.Name, isupipe.WithETag(comment.User.IconHash))
// icon取得はエラーになっても気にしない
if i > 10 { // 全部取ると多すぎるので10件まで
break
}
}
}

Expand Down

0 comments on commit db94374

Please sign in to comment.