-
Notifications
You must be signed in to change notification settings - Fork 15
feat/improve local walltime #97
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
Conversation
adriencaccia
commented
Nov 12, 2025
- feat: improve time unit display in local walltime
- feat: do not store the profile when CODPSEED_PROFILE_FOLDER is not set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the local walltime display by implementing human-readable time unit formatting and prevents profile storage when the CODSPEED_PROFILE_FOLDER environment variable is not set.
Key Changes:
- Added
format_time()function to convert nanosecond timestamps into human-readable strings with appropriate units (ns, µs, ms, s) - Modified profile storage logic to skip saving results when
CODSPEED_PROFILE_FOLDERis not configured - Removed unused
timeimport from plugin.py
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_format_time.py | New test file covering various time formatting scenarios across all supported units |
| src/pytest_codspeed/plugin.py | Updated to skip profile storage when profile_folder is None and removed unused import |
| src/pytest_codspeed/instruments/walltime.py | Added format_time() function and integrated it into benchmark table display |
Comments suppressed due to low confidence (1)
src/pytest_codspeed/instruments/walltime.py:1
- Corrected comment on line 408 from 'Less than 1 millisecond' to 'Less than 1 second'.
from __future__ import annotations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #97 will degrade performances by 16.4%Comparing Summary
Benchmarks breakdown
|
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
b4f92d8 to
bb84077
Compare