Skip to content

chore: lower well-known stats threshold to 40#319

Merged
Amund211 merged 1 commit into
mainfrom
lower-well-known-threshold-40
Jul 12, 2026
Merged

chore: lower well-known stats threshold to 40#319
Amund211 merged 1 commit into
mainfrom
lower-well-known-threshold-40

Conversation

@Amund211

Copy link
Copy Markdown
Owner

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, over the last 12 hours as of 2026-07-12 14:59 CEST:

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 covers 3.4% of samples, up from 0.6% at the previous threshold of 75.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings July 12, 2026 13:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 wellKnownStatsThreshold from 75 to 40 in the provider-mode decision logic.

@Amund211 Amund211 merged commit 665e3be into main Jul 12, 2026
10 checks passed
@Amund211 Amund211 deleted the lower-well-known-threshold-40 branch July 12, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants