From 53d22a008ebbf809418f997d4de5114cb8ca63b8 Mon Sep 17 00:00:00 2001 From: Amund Eggen Svandal Date: Sun, 12 Jul 2026 14:58:49 +0200 Subject: [PATCH] chore: lower well-known stats threshold to 40 Lower wellKnownStatsThreshold from 75 to 40 so ProviderModeWellKnown treats players with at least 40 stored stat records as well-known (querying the provider for fresh data); everyone below the threshold behaves like ProviderModeNever. Methodology: sampled the statsCount emitted by the "Counted stored player stats for well-known provider mode" log line via Cloud Logging Analytics (console.cloud.google.com/logs/analytics), over the last 12 hours as of 2026-07-12 14:59 CEST, and computed the share of requests clearing each candidate threshold: WITH logs AS ( SELECT * FROM `prism-overlay.global._Default._AllLogs` UNION ALL SELECT * FROM `prism-overlay.global._Required._AllLogs` ), stats AS ( SELECT SAFE_CAST(JSON_VALUE(json_payload.statsCount) AS INT64) AS stats_count FROM logs WHERE JSON_VALUE(json_payload.statsCount) IS NOT NULL ) SELECT t AS threshold, COUNTIF(stats_count >= t) AS count_run, ROUND(100 * COUNTIF(stats_count >= t) / COUNT(*), 1) AS pct_run FROM stats CROSS JOIN UNNEST([5, 10, 15, 20, 25, 30, 40, 50, 60, 75, 100, 150, 250, 500, 1000]) AS t WHERE stats_count IS NOT NULL GROUP BY t ORDER BY t threshold | count_run | pct_run ----------+-----------+-------- 5 | 52850 | 39.7 10 | 28112 | 21.1 15 | 18428 | 13.8 20 | 13276 | 10.0 25 | 10371 | 7.8 30 | 7908 | 5.9 40 | 4531 | 3.4 50 | 2872 | 2.2 60 | 1885 | 1.4 75 | 1085 | 0.8 100 | 636 | 0.5 150 | 309 | 0.2 250 | 179 | 0.1 500 | 70 | 0.1 1000 | 6 | 0.0 statsCount >= 40 covered 3.4% of samples, up from 0.6% at the previous threshold of 75. Co-Authored-By: Claude Opus 4.8 (1M context) --- internal/app/get_and_persist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/app/get_and_persist.go b/internal/app/get_and_persist.go index 7415f768..fb729b24 100644 --- a/internal/app/get_and_persist.go +++ b/internal/app/get_and_persist.go @@ -42,7 +42,7 @@ const ( // wellKnownStatsThreshold is the minimum number of stored stat records a player // must have for ProviderModeWellKnown to treat them as well-known and query the // provider for fresh data. -const wellKnownStatsThreshold = 75 +const wellKnownStatsThreshold = 40 func (m ProviderMode) validate() error { switch m {