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 using "pcov" extension #818

Open
remicollet opened this issue Jan 18, 2019 · 6 comments
Open

Code Coverage using "pcov" extension #818

remicollet opened this issue Jan 18, 2019 · 6 comments

Comments

@remicollet
Copy link
Contributor

FYI, Joe Watkins have start development of a new small extension dedicated to code coverage which shoold be simpler, and faster than using xdebug or phpdbg

https://github.com/krakjoe/pcov

Perhaps could make sense to allow this

@krakjoe FYI

@Grummfy
Copy link
Member

Grummfy commented Jan 21, 2019

thanks

@Hywan
Copy link
Member

Hywan commented Jan 21, 2019

Thanks for the insight! I will closely follow the project.

@krakjoe
Copy link

krakjoe commented Jan 21, 2019

PCOV is a specific driver for a specific thing ...

I wrote a thing about how interesting this whole area is, and then I started writing code ... I think what you want is closer to this ... it's still only giving you the (maximum resolution) information, like a driver, you must have pretty extensive internals knowledge to make use of it ... I hope that's useful :)

@Hywan
Copy link
Member

Hywan commented Jan 21, 2019

That's helpful, thanks!

Is PCOV still in beta, or we can assume it's stable?

@krakjoe
Copy link

krakjoe commented Jan 21, 2019

PCOV is really very simple, and I'm going to arrogantly mark is stable on the first pecl release should be next few days I hope ...

Inspector is stable, but, untested with 7.3 yet (started), and the example code I linked too was implemented today and so unreleased ...

@krakjoe
Copy link

krakjoe commented Jan 22, 2019

I haven't stopped thinking about this ... while what I showed you yesterday would allow you to write whatever kind of analysis you like in userland, it would also be slow, because invoking a user function (and creating the frame object, although we could improve it's efficiency by providing a transient frame, but that would introduce rules you might not be used too in userland) on every instruction, however light the function, is not very efficient ...

What we might do is write other tracers for pcov that can collect the same resolution information as you can with inspector, but efficiently, and with a simpler API ...

What I'm not sure of is, does this or any other PHP project have anyone on board able to make use of such detailed internals stuff in userland, or do we want to actually write the analysis stuff in C too ?

My brain is still working on it ... if you have any preferences, do words and I'll listen :)

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

No branches or pull requests

4 participants