Skip to content

[CI] Add per-file timing report to Mac Metal test job#695

Open
hughperkins wants to merge 1 commit into
mainfrom
ci/metal-per-file-timing
Open

[CI] Add per-file timing report to Mac Metal test job#695
hughperkins wants to merge 1 commit into
mainfrom
ci/metal-per-file-timing

Conversation

@hughperkins
Copy link
Copy Markdown
Collaborator

The Metal CI job has become slow and it is unclear which test files are responsible. This adds a lightweight pytest plugin that collects per-file call durations and renders a sorted summary table in the GitHub Actions job summary.

Issue: #

Brief Summary

copilot:summary

Walkthrough

copilot:walkthrough

@hughperkins hughperkins force-pushed the ci/metal-per-file-timing branch from 186a32c to ecbe5a2 Compare May 13, 2026 22:12
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 186a32cfa1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/run_tests.py
if int(threads) > 1:
pytest_args += ["-n", str(threads), "--dist=worksteal"]
if os.environ.get("QD_FILE_TIMING", "0") == "1":
pytest_args += ["-p", "pytest_file_timing"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Make the timing plugin importable before enabling it

When the Mac job exports QD_FILE_TIMING=1, this adds -p pytest_file_timing to every tests/run_tests.py invocation, but the new plugin lives in tests/python/pytest_file_timing.py while the script is executed as python tests/run_tests.py; at pytest plugin-import time only the repo root/tests script directory are on sys.path, not tests/python. I verified the enabled path fails during pytest configuration with ImportError: Error importing plugin "pytest_file_timing": No module named 'pytest_file_timing', so the new Mac test job will abort before collecting tests unless the plugin is moved/imported from an importable location or the path is added before calling pytest.

Useful? React with 👍 / 👎.

@hughperkins hughperkins force-pushed the ci/metal-per-file-timing branch 2 times, most recently from c9937dc to d6834c5 Compare May 13, 2026 22:20
The Metal CI job has become slow and it is unclear which test files are
responsible. This adds a lightweight pytest plugin that collects
per-file call durations and renders a sorted summary table in the
GitHub Actions job summary.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hughperkins hughperkins force-pushed the ci/metal-per-file-timing branch from d6834c5 to fdb6fb5 Compare May 13, 2026 22:21
@github-actions
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

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.

1 participant