Skip to content

Commit

Permalink
修正
Browse files Browse the repository at this point in the history
  • Loading branch information
wtks committed Dec 4, 2024
1 parent 6a90179 commit f757f32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bench/benchmarker/scenario/scenario.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func (s *Scenario) Score(final bool) int64 {
score := lo.SumBy(s.world.OwnerDB.ToSlice(), func(p *world.Owner) int64 { return p.SubScore.Load() }) / 100
if final {
score += lo.SumBy(s.world.RequestDB.ToSlice(), func(r *world.Request) int64 {
if r.Evaluated {
if r.Evaluated.Load() {
return 0
}
return int64(r.PartialScore())
Expand All @@ -295,7 +295,7 @@ func (s *Scenario) Score(final bool) int64 {

func (s *Scenario) TotalDiscount() int64 {
return lo.SumBy(s.world.RequestDB.ToSlice(), func(r *world.Request) int64 {
if r.Evaluated {
if r.Evaluated.Load() {
return int64(r.ActualDiscount())
} else {
return 0
Expand Down

0 comments on commit f757f32

Please sign in to comment.