generated from quinnj/Example.jl
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Print a completion message when all tests are done #192
Open
nickrobinson251
wants to merge
11
commits into
main
Choose a base branch
from
npr-log-when-all-tests-done
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+109
−41
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c9af808
Print completion message when all tests are done
nickrobinson251 0a70cef
More debug logs
nickrobinson251 d094db8
Bump version
nickrobinson251 0420a84
Log a message when each worker has completed tests
nickrobinson251 608994a
Fix import for `at-debugv`
nickrobinson251 74c16c0
Debug log after `close(worker)`
nickrobinson251 262f4e4
Use at-debug in workers.jl
nickrobinson251 3766e93
Add worker num to all worker restart messages
nickrobinson251 a618db8
Fix typo in debug message
nickrobinson251 16162fa
Make worker debug messages consistent
nickrobinson251 64b1a6c
Replace LoggingExtras.jl dep with our own debug macro (#195)
nickrobinson251 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
DEBUG_LEVEL::Int = 0 | ||
|
||
function setdebug!(level::Int) | ||
global DEBUG_LEVEL = level | ||
return nothing | ||
end | ||
|
||
""" | ||
withdebug(level::Int) do | ||
func() | ||
end | ||
""" | ||
function withdebug(f, level::Int) | ||
old = DEBUG_LEVEL | ||
try | ||
setdebug!(level) | ||
f() | ||
finally | ||
setdebug!(old) | ||
end | ||
end | ||
|
||
""" | ||
@debugv 1 "msg" | ||
""" | ||
macro debugv(level::Int, messsage) | ||
quote | ||
if DEBUG_LEVEL >= $level | ||
_full_file = $String($(QuoteNode(__source__.file))) | ||
_file = $last($splitdir(_full_file)) | ||
_line = $(QuoteNode(__source__.line)) | ||
msg = $(esc(messsage)) | ||
$print("DEBUG @ $(_file):$(_line) | $msg\n") | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
ah, so @Drvi this would be maybe too late already, since we hang before shutting down the workers?
Maybe we actually just want a log in
manage_worker
, here?:ReTestItems.jl/src/ReTestItems.jl
Line 695 in e9b7730
We could basically say
?
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.
Added. I just added a log for each worker, so they don't have to coordinate to know if they're the last worker to complete, and also because i suppose any of them could be the one to hang here.