Adjust output formatting and add graceful shutdown#21
Open
Likqez wants to merge 2 commits into
Open
Conversation
Contributor
|
I made my print interval Could you make it dynamically adjust padding to adjust for the largest number in each column or something? |
BoySanic
requested changes
Jun 24, 2026
| auto [scaled_input_speed, input_speed_unit] = scale_si(scaled_total_inputs / stage.total_time); | ||
| auto [scaled_output_speed, output_speed_unit] = scale_si(stage.total_outputs / stage.total_time); | ||
| std::printf("%-20s - %9.3f ms | %7.3f %% | %12" PRIu64 " -> %12" PRIu64 | ||
| std::printf("%-20s - %9.3f ms | %7.3f %% | %16" PRIu64 " -> %12" PRIu64 |
Contributor
There was a problem hiding this comment.
As stated before, same issue if you just increase the print interval enough (as it starts to affect the other columns too).
A better approach would be to dynamically change how the columns are padded based on the widest text that will go into the column, imo.
| #endif | ||
|
|
||
| #ifndef NO_GPU | ||
| for (auto &thread : gpu_threads) { |
Contributor
There was a problem hiding this comment.
If you're going to change this, move the following NO_CPU block into the first NO_CPU block too for consistency.
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.
This PR fixes #20, and includes a singnal handler to do graceful shutdown.
The handler also prints a final message, before exiting, giving the user more insight into how many seeds have been checked, and what the initial start seed was.