chore: lower well-known stats threshold to 40#319
Merged
Conversation
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) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Lowers the cutoff used by ProviderModeWellKnown to decide whether to treat a player as “well-known” (and therefore query the provider for fresh data) based on the number of stored stat records.
Changes:
- Reduced
wellKnownStatsThresholdfrom 75 to 40 in the provider-mode decision logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lower
wellKnownStatsThresholdfrom 75 to 40 soProviderModeWellKnowntreats players with at least 40 stored stat records as well-known (querying the provider for fresh data); everyone below the threshold behaves likeProviderModeNever.Methodology
Sampled the
statsCountemitted by the "Counted stored player stats for well-known provider mode" log line via Cloud Logging Analytics, over the last 12 hours as of 2026-07-12 14:59 CEST:statsCount >= 40covers 3.4% of samples, up from 0.6% at the previous threshold of 75.🤖 Generated with Claude Code