Skip to content

only compare executables with data on the comparison page - #114

Closed
mattip wants to merge 1 commit into
python:mainfrom
mattip:getcomparisonexes
Closed

mattip wants to merge 1 commit into
python:mainfrom
mattip:getcomparisonexes

Conversation

@mattip

@mattip mattip commented Nov 13, 2026

Copy link
Copy Markdown

The comparison sidebar's executable section is built by getcomparisonexes, which emits the full cross product of a project's executables with its tagged revisions and untagged branch heads: executables × (tags + head) entries. Nothing in the schema records which executable was built at which revision, so every pair is offered. Many of those combinations were never benchmarked. Adding a second executable to a project doubles its entry count.

Result is the only source of truth for which pairs exist, so this PR looks them up once
(one extra query per page) and drops any pair with no results. On speed.pypy.org that takes the sidebar from 144 entries to 124. On speed.python.org nothing changes: each
project there has a single executable and no tagged revisions, so no pair was ever dead.

I noticed this when I added a new cpython executable, suddenly there are a lot of entries that don't make sense.

Comment thread codespeed/views_data.py
})
for branch, rev in branch_heads.get(proj.id, []):
for exe in Executable.objects.filter(project=proj):
if (exe.id, rev.id) not in benchmarked:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, this drops an executable unless it has results at exactly the branch's head revision, so it could also catche live executables and not just dead pairs. If I understand this correctly, if one executable's build fails for a night, its "latest" entry disappears until the next success, even though it has results one revision back?

@mattip

mattip commented Nov 15, 2026

Copy link
Copy Markdown
Author

Closing, I solved the problem by reusing the same (3) branch for all cpython3 runs

@mattip mattip closed this Nov 15, 2026
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