from Hacker News

Phptop: Simple PHP ressource profiler, safe and useful for production sites

by kadrek on 6/5/25, 8:52 AM with 13 comments

  • by basilgohar on 6/5/25, 11:15 AM

    This is interesting, but it seems it's more useful for WordPress sites with the specific WPDB logic they have.

    It'd be more interesting if, instead, they could intercept PDO queries and add profiling to those, for example.

    Still, free code is free code. I don't want to look down upon it, just that the utility for my case is limited.

  • by nchmy on 6/5/25, 2:18 PM

    Its not evident to me what this does... It says that it "prints per query and average metrics", but it seems to just output some extremely generic stats. Does "query" actually mean request here?

    I see there's a wordpress-specific wpdb mechanism - though it just seems to report total time spent on queries, and the slowest query. Surely something like Query Monitor is a far better tool for that?

    A tool that everyone should be aware of and using is php-spx - its absolutely glorious for performance profiling/investigation. xhgui is similar, but bulkier and (in my experience) less accurate/insightful.

    https://github.com/NoiseByNorthwest/php-spx

  • by 127dot1 on 6/5/25, 10:29 AM

    Is it compatible with nginx+php-fpm stack?