Skip to content

feat: CPU Profiling - #763

Merged
bxyu-nvidia merged 17 commits into
mainfrom
bxyu/add-profiling
Feb 25, 2026
Merged

bxyu-nvidia merged 17 commits into
mainfrom
bxyu/add-profiling

Conversation

@bxyu-nvidia

Copy link
Copy Markdown
Contributor

No description provided.

@copy-pr-bot

copy-pr-bot Bot commented Feb 25, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
@bxyu-nvidia
bxyu-nvidia marked this pull request as ready for review February 25, 2026 21:02
@bxyu-nvidia
bxyu-nvidia requested a review from a team as a code owner February 25, 2026 21:02
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
Signed-off-by: Brian Yu <[email protected]>
@bxyu-nvidia
bxyu-nvidia merged commit cbf7c80 into main Feb 25, 2026
6 checks passed
@bxyu-nvidia
bxyu-nvidia deleted the bxyu/add-profiling branch February 25, 2026 23:39
fsiino-nvidia pushed a commit that referenced this pull request Feb 26, 2026
fsiino-nvidia pushed a commit that referenced this pull request Feb 26, 2026
abubakaria56 pushed a commit to abubakaria56/Gym that referenced this pull request Mar 2, 2026
abubakaria56 pushed a commit to abubakaria56/Gym that referenced this pull request Mar 2, 2026
kajalj22 added a commit that referenced this pull request Aug 27, 2026
96.0 was inherited from a Feb 2026 drive-by bump (PR #763) with no
documented rationale, and main currently sits at ~95.99% even after
this PR's added tests. Set fail_under = 95.9 (a small buffer below
measured coverage) so the newly-enforced gate is real and achievable
today, instead of blocking on debt this PR doesn't fully close.

Also fixes cov_fail_under.py, which truncated fractional thresholds
(e.g. 95.9 -> 95) since it always cast to int; it previously only
worked by coincidence because 96.0 has no fractional part.

Signed-off-by: Kajal Jain <[email protected]>
cmunley1 added a commit that referenced this pull request Aug 27, 2026
## Summary
- The 96% coverage gate (`[tool.coverage.report] fail_under`) previously
only ran in `full-test-suite.yml`, which triggers on `push` to `main` —
never a required PR check, so it never blocked a merge. The equivalent
step in `unit-tests.yml` (the PR-time, required-check workflow) printed
the `FAIL Required test coverage...` banner on every PR but reported
itself green anyway.
- `unit-tests.yml`'s coverage-producing steps ("Core unit tests",
sandbox env setup, "Sandbox unit tests") are now merged into **one
step**, matching `full-test-suite.yml`'s "Test" step exactly. Splitting
them across separate steps was silently defeating `--cov-fail-under` on
GitHub's runners for reasons not fully diagnosable without a matching
Linux environment to inspect; the merged single-step form is the one
we've verified reliably fails when it should (see Test plan).
- This step now runs unconditionally (not gated on `run_full`), so the
gate can't be silently skipped by change-detection misclassifying a PR —
intentional tradeoff of a bit of extra CI time on every PR for the gate
always actually running.
- Added `scripts/ci/cov_fail_under.py`, which reads the threshold from
`pyproject.toml`. Both workflows call `--cov-fail-under="$(python3
scripts/ci/cov_fail_under.py)"` instead of each hardcoding the number,
so `pyproject.toml` is the single source of truth.
- Lowered the threshold from 96.0% to 95.0%. 96% was an undocumented
ratchet inherited from an unrelated PR (#763, Feb 2026), and `main`
currently measures ~95.99% — enforcing 96% pre-merge would immediately
block every subsequent PR touching core code on pre-existing debt. 95%
gives a small buffer below current measured coverage so the gate is real
and passing today.

## Test plan
- [x] `pre-commit run --files <changed files>` passes
- [x] `python3 scripts/ci/cov_fail_under.py` correctly reads
`pyproject.toml` and prints the threshold
- [x] **Verified live on this PR's own CI** that the gate actually
fails: temporarily pushed `fail_under=100`, confirmed a real `##[error]`
annotation and exit code 1 (not just a printed warning), then reverted
to 95
- [x] CI green on this PR at the final 95% threshold

---------

Signed-off-by: Kajal Jain <[email protected]>
Co-authored-by: Christian Munley <[email protected]>
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