Open
Conversation
e027aa8 to
05e692a
Compare
rswarbrick
reviewed
Feb 5, 2026
Contributor
rswarbrick
left a comment
There was a problem hiding this comment.
This looks nice to me (but I'd suggest slightly tweaking the print_header rejig)
machshev
approved these changes
Feb 5, 2026
Collaborator
machshev
left a comment
There was a problem hiding this comment.
Nice, thanks @AlexJones0
|
|
||
| from dvsim.logging import log | ||
|
|
||
| DEFAULT_HEADER = "Q: queued, D: dispatched, P: passed, F: failed, K: killed, T: total" |
Collaborator
There was a problem hiding this comment.
Just a thought for later, but you could build this as a function of the JobStatus enum. Then append the total at the end.
The header could then be fixed and change automatically with JobStatus members.
Contributor
Author
There was a problem hiding this comment.
Definitely agree - I think there's potential for more refactoring here in general as the status printer and job status are quite strongly linked, especially when the Enum is introduced.
Keep this as the default value and move it to a named constant for now to avoid repetition. This abstraction likely needs more work and this can be moved to a different location (the status table in general is quite entangled with the JobStatus), but that refactoring should be handled independent of this commit, which is just applying a fix. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
If the EnlightenStatusPrinter is initialized and then `.exit()` is called without ever first calling `.print_header()`, then the `.exit()` method will attempt to call the `.close()` method on `None`, giving an `AttributeError`. Add a presence check to fix this. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Enlighten registers logic to (at least partially) reset the terminal using the `atexit` library and clean up, but we should explicitly close the Enlighten manager when we cleanup/exit the status printer to make sure that the terminal is fully restored to its normal working state. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
05e692a to
699307b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A couple of small bug fixes / cleanups to the
EnlightenStatusPrinter- see the commit messages for more details. There is definitely potential for refactoring the help message logic but the change is kept intentionally small for now to focus on the bug fix, and because larger-scale refactors/rewrites may come later.