Skip to content
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

Clean up printing of testset start #33408

Merged
merged 1 commit into from
Oct 5, 2019
Merged

Clean up printing of testset start #33408

merged 1 commit into from
Oct 5, 2019

Conversation

Keno
Copy link
Member

@Keno Keno commented Sep 27, 2019

This has bothered me for a while, but looks like it didn't bother
anyone else enough to clean it up, so here I go :). Printing when
a test starts is useful when looking through logs because you can
correlate errors on a given worker with the specific test it was
running. However, it doesn't have to be so ugly and break the nice
regular formatting of the rest of the test.

Before:

Test  (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
      From worker 3:	running testset int...
      From worker 2:	running testset math...
int        (3) |     9.51 |   0.21 |  2.2 |     507.51 |   232.42
math       (2) |    81.06 |   0.75 |  0.9 |    3391.19 |   323.18

Test Summary: |    Pass    Total
  Overall     | 1637318  1637318
    SUCCESS

After:

Test  (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
int        (3) |        started at 2019-09-27T18:35:02.761
math       (2) |        started at 2019-09-27T18:35:02.883
int        (3) |    11.91 |   0.28 |  2.4 |     723.85 |   278.07
math       (2) |    40.51 |   0.87 |  2.1 |    3287.85 |   325.49

Test Summary: |    Pass    Total
  Overall     | 2030534  2030534
    SUCCESS

This has bothered me for a while, but looks like it didn't bother
anyone else enough to clean it up, so here I go :). Printing when
a test starts is useful when looking through logs because you can
correlate errors on a given worker with the specific test it was
running. However, it doesn't have to be so ugly and break the nice
regular formatting of the rest of the test.

Before:
```
Test  (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
      From worker 3:	running testset int...
      From worker 2:	running testset math...
int        (3) |     9.51 |   0.21 |  2.2 |     507.51 |   232.42
math       (2) |    81.06 |   0.75 |  0.9 |    3391.19 |   323.18

Test Summary: |    Pass    Total
  Overall     | 1637318  1637318
    SUCCESS
```
After:
```
Test  (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
int        (3) |        started at 2019-09-27T18:35:02.761
math       (2) |        started at 2019-09-27T18:35:02.883
int        (3) |    11.91 |   0.28 |  2.4 |     723.85 |   278.07
math       (2) |    40.51 |   0.87 |  2.1 |    3287.85 |   325.49

Test Summary: |    Pass    Total
  Overall     | 2030534  2030534
    SUCCESS
```
@vtjnash
Copy link
Member

vtjnash commented Sep 28, 2019

seems slightly silly to have the master ask the worker to ask the master to print this information—perhaps just print it on the master in the first place?

Also, why do we have a custom lock in this file? can it just use the advisory IO lock on stdout with do-block syntax?

@Keno
Copy link
Member Author

Keno commented Sep 28, 2019

seems slightly silly to have the master ask the worker to ask the master to print this information—perhaps just print it on the master in the first place?

I figured this way would catch if the worker had died after reporting the previous test completion. Not a huge benefit though, I agree.

@ararslan ararslan added display and printing Aesthetics and correctness of printed representations of objects. testsystem The unit testing framework and Test stdlib labels Sep 29, 2019
@Keno
Copy link
Member Author

Keno commented Oct 5, 2019

Merging, since this seems like a strict improvement. We can do refactoring of the I/O locking here at a later point.

@Keno Keno merged commit cff873b into master Oct 5, 2019
@Keno Keno deleted the kf/teststartprint branch October 5, 2019 06:29
vtjnash added a commit to JuliaCI/CoverageBase.jl that referenced this pull request Nov 1, 2019
JuliaLang/julia#33408 added an additional expectation that we define `print_testworker_started`. We don't need it, so we just provide a stub to keep working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. testsystem The unit testing framework and Test stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants