Skip to content

Commit

Permalink
Up the numbers. new scenario should last about every 6 hourish
Browse files Browse the repository at this point in the history
  • Loading branch information
McSick committed Sep 9, 2024
1 parent 21613a9 commit 117a7e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/checkoutservice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func mockDatabaseCall(ctx context.Context, maxTime int, name, query string) {
}

func loadDiscountFromDatabase(ctx context.Context, cachesize int) string {
numCalls := math.Max(1, math.Pow(float64(cachesize)/6000, 4)/350)
numCalls := math.Max(1, math.Pow(float64(cachesize)/6000, 4)/3000)
for i := float64(0); i < numCalls; i++ {
mockDatabaseCall(ctx, 250, "SELECT checkout.discounts", "SELECT * FROM discounts WHERE user = ?")
}
Expand Down

0 comments on commit 117a7e8

Please sign in to comment.