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

code coverage should use compiler support #19

Open
timotheecour opened this issue Mar 1, 2020 · 1 comment
Open

code coverage should use compiler support #19

timotheecour opened this issue Mar 1, 2020 · 1 comment

Comments

@timotheecour
Copy link
Contributor

timotheecour commented Mar 1, 2020

@samuelroy
In light of things like #13, I think we can do much better and 100% accuracy (maybe) by using compiler support (via instrumentation of the nim code directly) instead of lcov based approach.
Let me know if you'd be interested in exploring that approach, happy to help; I think it's very doable.
Code coverage is a very useful basic feature that helps with many things, eg testing, finding bugs, improving code quality in general, so it's an important feature nim should have

implementation details

I think looking at optProfiler in nim code (enabled by nim --profiler:on) should be a good starting point

EDIT

see https://forum.nim-lang.org/t/7024#44128 where I detail what I've worked on (tracing)

@timotheecour timotheecour changed the title code coverage should have compiler support code coverage should use compiler support Mar 1, 2020
@samuelroy
Copy link
Collaborator

I've already looked at implementing my own profiler based on how nimprof works with no success so far.
The profiler seems to work only in a sampling mode. Do you have a working example of code instrumentation with Nim?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants