Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Skipping built-in functions for Tideways XHProf extension #32

Closed
panychek opened this issue Nov 20, 2019 · 7 comments
Closed

Skipping built-in functions for Tideways XHProf extension #32

panychek opened this issue Nov 20, 2019 · 7 comments

Comments

@panychek
Copy link
Contributor

Hi. I use this collector along with the tideways_xhprof extension and I don't want to profile PHP built-in functions (using the TIDEWAYS_XHPROF_FLAGS_NO_BUILTINS flag).
Am I right to assume there's no way to do that at the moment, since this call doesn't take options?

@markstory
Copy link
Member

Not right now, but we accept pull requests 😄

@panychek
Copy link
Contributor Author

Well, I'd suggest then creating a new optional parameter in the XHGui config file - say, 'profiler.flags'.
If it's there, we pass the value to the appropriate _enable() function instead of the defaults.
What do you think?

@Yivan
Copy link

Yivan commented Dec 21, 2019

Hello,

This feature of abilities to customize flags will be really need. Because performance are a lot better by disabling CPU flags too (see please: #35).
They are native parameters of Xhprof, so should be customizable with this xghui middleware.

Thanks.

@glensc
Copy link
Contributor

glensc commented Feb 10, 2020

This seems to be solved via 1.8.0: #32

@glensc glensc closed this as completed Feb 10, 2020
@Yivan
Copy link

Yivan commented Feb 10, 2020

@glensc Thanks !

Are you sure ? I checked the code and we have:

    $flags = TIDEWAYS_FLAGS_CPU | TIDEWAYS_FLAGS_MEMORY | TIDEWAYS_FLAGS_NO_SPANS;

    if ($skipBuiltIn) {
        $flags |= TIDEWAYS_FLAGS_NO_BUILTINS;
    }

What is the way to disable TIDEWAYS_FLAGS_CPU for instance ? This one is pretty greddy, so disabling it bring a lot more faster website when xhprof is activated.

Thanks

@glensc
Copy link
Contributor

glensc commented Feb 10, 2020

@Yivan yes, read the original issue description.

don't hijack random issues and add more topics there.

I've left a comment for you in #35

@Yivan
Copy link

Yivan commented Feb 11, 2020

@glensc Sorry my intend was really not hijacking this issue, it's an error from my part i was thinking built-in function where talking about the default parameters (CPU flags, etc...), but you are right subject is TIDEWAYS_XHPROF_FLAGS_NO_BUILTINS. Issue 35 is the one for my subject. Best regards.

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

No branches or pull requests

4 participants