-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Add "project" mode for faster code coverage and allocation tracking #43711
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
Add "project" mode for faster code coverage and allocation tracking #43711
Conversation
32293c4 to
8697ff4
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
That's possible here via |
This comment has been minimized.
This comment has been minimized.
|
I think as long as people can directly set |
207f8b6 to
27f01f2
Compare
|
@JeffBezanson do you think this is a good idea? If so, I'd be happy to fix up tests etc. |
src/julia.h
Outdated
| int8_t compile; | ||
| int8_t infer; | ||
| uint8_t istopmod; | ||
| uint8_t isprojmod; |
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.
This should probably not be added, since it's not an intrinsic property of a module but can change based on context.
|
Triage suggested simplifying this instead with a |
27f01f2 to
81abdfe
Compare
|
Replaced by #44359 |
Adds a
projectoption to--code-coverageand--track-allocationfor just tracking the active project module and its submodules.For instance with code coverage:
after which coverage files will be generated within the
Foomodule and its submodules, but no other imported modules.The idea is to increase the efficiency of code coverage and allocation tracking given that the current most narrow option is
userwhich is any non-Core module, including stdlibs.The
julia-runtestgithub action defaults to having code coverage on which Pkg sets tousermode, so is currently spending the majority of code-coverage tracking time in modules that won't be evaluated for code coverage by the coverage tooling that just evaluates coverage files the active repo.Benchmarks
A favorable case, where the project code is small, but dep code is large
src/Foo.jlCode Coverage
allis a lot slower than the others, so compare the others with more iterationsSo
projectis ~2x faster thanuser, and the.covfiles forsrc/Foo.jlare near-identical foruserandproject(might code-cov iterators not be thread-safe?)In real-world testing, it might be hard to see this in above CI variability.
Here I ran
OrdinaryDiffEq's test suite on 5f6b8a1 (before this PR) and 27f01f2 (this PR)A few testsets as examples:
Tracking Allocations
again,
allis a lot slower than the others, so compare the others with more iterationsSo
projectis ~8x faster thanuser, and the.memfiles forsrc/Foo.jlare identical foruserandprojectTodo
Closes #41626
May close #36142