Skip to content

CodSpeed: test_pickle_load[arm] is bimodal and randomly flags unrelated PRs #1110

Open

Description

@Siyet

test_pickle_load[arm] (added in #1092) is bimodal: it flips between ~1.6 ms and ~1.8 ms across commits that don't touch the pickle path at all, so with the 2% threshold it randomly paints unrelated PRs red.

Evidence from this week:

Since this is simulation mode (instruction counting), it's not run-to-run measurement noise: the benchmark appears sensitive to code layout/alignment in _core.c, so any code addition can toggle it between the two states. Related to the general variance discussion in #1075 and CodSpeedHQ/codspeed#409.

Options (all live in the CodSpeed dashboard, admin only - there's no repo-side config for this):

  1. Set a per-benchmark regression threshold for test_pickle_load[arm] above the flip amplitude (say 15%). Keeps measuring, stops the false gating.
  2. Ignore the benchmark entirely in CodSpeed.
  3. The repo-wide "informational status check" toggle, which would also address the "CI looks perpetually broken" complaint from Fix crash on incorrect typing.ClassVar annotation #1097.

Option 1 seems the most targeted. Worth checking whether the sibling test_pickle_* benchmarks from #1092 show the same behavior before picking.

Activity

  1. provinzkraut commented on Jul 2, 2026

    @provinzkraut
    Member

    This isn't specific to that benchmark. It's an issue with running the benchmarks in different envs. We need to revisit the continuous benchmarking approach, since codspeed could not delivery on its promises regarding stability.

  2. Siyet commented on Jul 3, 2026

    @Siyet
    ContributorAuthor

    Might well be both. For the #978 flag specifically the report had no "different runtime environments" warning, and both baseline points (b36a4a1 at 1.6 ms, 8f7ac06 at 1.8 ms) were regular post-#1079 pushes to main, with the flip caused by a commit that doesn't touch the pickle path at all - which looks like code-layout sensitivity of simulation mode rather than env variance.

    Either way the remediation is the same: a 2% threshold can't gate benchmarks with a >=10% inherent swing, whether that swing comes from env mismatch or layout effects. Happy to help evaluate options if you want to revisit the setup.

  3. Siyet commented on Jul 3, 2026

    @Siyet
    ContributorAuthor

    @ofek @jcrist tagging you for visibility: the practical levers here (per-benchmark thresholds, the informational-mode toggle, or ignoring a benchmark) all live in the CodSpeed dashboard and need admin rights there, so this is actionable only by you two. And if we end up revisiting the benchmarking approach more broadly per Janek's comment above, that decision wants your input anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions