Skip to content

gh-100257: summarize_stats: Link failure kinds to GitHub search #100258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

lpereira
Copy link
Contributor

@lpereira lpereira commented Dec 14, 2022

By adding links to each row in the failure kind table, we can find where in the code that failure kind has been collected by the specialization code. Search is performed only in specialize.c in the python/cpython repo (the script is unaware of forks at the moment).

By adding links to each row in the failure kind table, we can find
where in the code that failure kind has been collected by the
specialization code.
@netlify
Copy link

netlify bot commented Dec 14, 2022

Deploy Preview for python-cpython-preview canceled.

Name Link
🔨 Latest commit 4fa35fc
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/639a53fe49fdf6000894537a

@lpereira
Copy link
Contributor Author

It looks like this:

Screen Shot 2022-12-14 at 3 01 18 PM

Sample search result: array int.

@markshannon
Copy link
Member

That link returns a page with "We couldn’t find any code matching 'repo:python/cpython path:Python/specialize.c SPEC_FAIL_SUBSCR_ARRAY_INT' ".

Since this can produce misleading search results for branches other than main, it is likely to be counter productive for experimental stats and changes to the stat names.

@mdboom
Copy link
Contributor

mdboom commented Dec 15, 2022

That link returns a page with "We couldn’t find any code matching 'repo:python/cpython path:Python/specialize.c SPEC_FAIL_SUBSCR_ARRAY_INT' ".

Hmm, it works for me.

Since this can produce misleading search results for branches other than main, it is likely to be counter productive for experimental stats and changes to the stat names.

That could be resolved since we know the hash of the Python that produced it, we could include that in the search URL, if GitHub search supports such a thing. That would make them "permanent" in a sense.

IMHO, this is better than nothing despite that issue -- it is hard to know what these snippets of text refer to. Perhaps better (but obviously more work) would be to document them.

@markshannon
Copy link
Member

@markshannon
Copy link
Member

I'm not sure linking to the source for the macro is going to help clarify stuff.
For the failure kinds that aren't clear, improving the text seems the best option to me.

@encukou
Copy link
Member

encukou commented Apr 10, 2024

The link now leads me (iff I'm signed in to Github) to the line #define SPEC_FAIL_SUBSCR_ARRAY_INT 9, which doesn't seem too useful. It takes several clicks to meaningfully get to the other occurences.
(Having the macro name available for copying into an editor search box would make sense to me, but, I don't really use this tool.)

The PR has significant conflicts now. Should it be closed, or improved?

@mdboom
Copy link
Contributor

mdboom commented Apr 10, 2024

I think we should give this sufficient time for the OP to comment before closing just in case (👋 @lpereira! Hope things are well with you!), but... a lot has changed since this was posted, including a major refactor of summarize_stats.py (so this would be a full rewrite, probably), and full help messages have been added to these tables. It's not as sophisticated as this, but it gets us closer to answering "what does this mean?" for the user of this output.

@lpereira
Copy link
Contributor Author

lpereira commented Apr 10, 2024 via email

@mdboom
Copy link
Contributor

mdboom commented Apr 10, 2024

Thanks, @lpereira. Going to close this, then.

@mdboom mdboom closed this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants