frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Sharing everything I could understand about gradient noise

https://blog.pkh.me/p/42-sharing-everything-i-could-understand-about-gradient-noise.html
1•ux•52s ago•0 comments

Exploring AI Integrations with Adobe Photoshop, InDesign and Premiere Pro

https://www.mikechambers.com/blog/post/2025-06-06-exploring-ai-integration-with-adobe-photoshop-indesign-and-premiere-pro/
1•mesh•1m ago•0 comments

Rare Viking Gold Arm-Ring Discovered on Isle of Man

https://allthathistory.com/archaeology-discoveries/viking-gold-arm-ring-isle-of-man/2711/
1•speckx•5m ago•0 comments

Global Greening from Higher CO2 Hits "Striking" New Heights – Modernity

https://modernity.news/2025/06/06/global-greening-from-higher-co2-hits-striking-new-heights/
2•bilsbie•5m ago•0 comments

Ask HN: Should I build a directory product?

2•alizaid•7m ago•1 comments

History and Disposition

https://v5.chriskrycho.com/notes/history-and-disposition/
1•mooreds•8m ago•0 comments

Should You "Rent" an Exec for Your Startup? A Fractional COO Weighs In

https://review.firstround.com/fractional-exec-hiring-guide/
1•mooreds•8m ago•0 comments

Miami's Drinking Water Is Threatened by a Florida Nuclear Plant

https://www.bloomberg.com/news/features/2025-06-05/bankrupt-upper-west-side-private-school-s-bold-growth-plan-sowed-its-demise
1•gametorch•14m ago•3 comments

The Computer Revolution of the 80s Told by a Pioneer: Lee Felsenstein [video]

https://www.youtube.com/watch?v=rASMe9FDjbg
3•ohjeez•17m ago•0 comments

Show HN: Use OpenAI's 4o to create game assets, publish to Creative Commons

https://gametorch.app/
4•gametorch•18m ago•0 comments

Orbital Ambush? Russian Satellites Move Like Predators Around U.S. Target

https://spacetechtimes.com/are-russian-satellites-creeping-toward-american/
2•nabla9•20m ago•0 comments

(How) One Ancient Language Went Global

https://www.bloomsbury.com/us/proto-9781639732586/
1•handfuloflight•22m ago•0 comments

Neven Mrgan on Why Skeuomorphism Is Like a Classic Car

https://appdocumentary.com/2015/01/08/neven-mrgan-on-why-skeuomorphism-is-like-a-classic-car/
2•tambourine_man•24m ago•0 comments

PhDs for Entrepreneurs

https://medium.com/@danzhang/phds-for-entrepreneurs-7cdbdd891ff3
1•jxmorris12•26m ago•0 comments

Human Vestigiality

https://en.wikipedia.org/wiki/Human_vestigiality
1•elsewhen•26m ago•0 comments

Mprocs written in Rust: Run multiple commands in parallel

https://github.com/pvolok/mprocs
1•behnamoh•27m ago•0 comments

JavaScript await was rogue rogue along

https://codedynasty.dev/posts/Javascript-await-was-rogue-all-along
1•66yatman•27m ago•0 comments

The Common Pile v0.1

https://blog.eleuther.ai/common-pile/
2•Philpax•27m ago•0 comments

Private Japanese spacecraft crashes into moon in 'hard landing,' ispace says

https://www.space.com/astronomy/moon/private-japanese-spacecraft-resilience-ispace-moon-landing-attempt
2•pseudolus•28m ago•0 comments

Food and beer are common perks in hospitality – but are they masking unfairness?

https://theconversation.com/free-food-and-beer-are-common-perks-for-hospitality-workers-but-are-they-masking-unfairness-256330
1•PaulHoule•29m ago•0 comments

New observatory is assembling most complete time-lapse record of night sky

https://phys.org/news/2025-06-observatory-lapse-night-sky.html
1•bookmtn•31m ago•0 comments

Supreme Court Rules 1964 Civil Rights Act Also Protects Whites

https://www.stevesailer.net/p/supreme-court-rules-1964-civil-rights
4•mpweiher•32m ago•2 comments

Using Proprietary Golinks in Firefox

https://www.dgt.is/blog/2025-06-04-proprietary-golinks-firefox/
1•speckx•33m ago•0 comments

Memory optimization is the best way to write high performing CUDA kernel for AI

1•thecongluong•33m ago•0 comments

Exercise Is Great but It's Not a Cancer Drug

https://www.sensible-med.com/p/exercise-is-great-but-its-not-a-cancer
1•hilux•33m ago•0 comments

The Man Whose Weather Forecast Saved the World

https://www.nytimes.com/2025/06/05/weather/d-day-forecast-history-wwii.html
1•tusslewake•35m ago•0 comments

Private lunar lander from Japan crashes into moon in failed mission

https://phys.org/news/2025-06-private-lunar-lander-japan-falls.html
1•bookmtn•36m ago•0 comments

The Accountability Sink in AI Advertising

https://wordsandmoneyinmachines.substack.com/p/ais-advertising-accountability-sink
1•cahoots8727•38m ago•0 comments

What methylene blue can (and can’t) do for the brain

https://neurofrontiers.blog/what-methylene-blue-can-and-cant-do-for-the-brain/
2•wiry•38m ago•0 comments

Sipeed NanoCluster fits 7-node Pi cluster in 6cm

https://www.jeffgeerling.com/blog/2025/sipeed-nanocluster-fits-7-node-pi-cluster-6cm
1•mikece•39m ago•0 comments
Open in hackernews

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

https://github.com/bearstech/phptop
100•kadrek•1d ago

Comments

127dot1•1d ago
Is it compatible with nginx+php-fpm stack?
tarjei_huse•1d ago
Looks likely. The server part of it is just a PHP-hook.
joshstrange•1d ago
Yeah, from a brief glance at this, it just adds a file that runs on every request which logs out to the php error log and then there’s another script that can parse that error log.
zerodeux•22h ago
Exactly.

I'm the author, it's funny this thing pops up now, it was written +15 years ago and is barely maintained (but AFAKI still works).

The metrics collected are close to those from PHP-FPM (CPU user/sys, clock time, peak memory) + the wpdb hook because I had to profile lots of WP.

The most interesting part is the 'phptop' tool itself which actually parse the logs and make some useful histograms.

Its main force I think it's that it's very lightweight (500 lines of Perl, fast and efficient regexes), works everywhere (very old Perl will do), and gives results instantly. My usecase used to be : apt install phptop, wait (at least) 1min for data collection, get useful histogram. It's also obviously very easy to uninstall.

It does pollute the error log, but it's the most simple and universal data sink I could think of, and well it's a hack in the end.

Patches still welcome anyway :).

rthnbgrredf•1d ago
Yes, but php-fpm already has this kind of information for you: https://www.inanzzz.com/index.php/post/6cn7/formatting-php-f...

You can print the time, cpu and memory usage per request and build metrics based on these outputs. This can be done in any major cloud, with open source tooling and even with simple linux coretuils. One tool to visualize such metrics is Grafana.

zerodeux•22h ago
It is compatible with Nginx+FPM. It won't use the PHP-FPM specific logs (and thus does not impose any specific value from you for the access.format PHP-FPM setting). But it has to figure out where your app's error log is.
basilgohar•1d ago
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.

zerodeux•22h ago
The wpdb logic is an addon and only triggers if wpdb is found. Phptop might still be useful in the general case to quickly and cheaply find CPU hotspots.

Nowadays it would be necessary to also show the various Curl/API calls because they're so omnipresent and impactfull on PHP sites (as wait time and not CPU time)... But AFAIK it's pretty hard to intercept them in a generic way.

nchmy•1d ago
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

BafS•1d ago
I can't praise SPX enough, it has saved my ass multiple times. The UI is great too.
xd•22h ago
From a quick skim of the repo it looks to be injecting phptop_hook.php into any call to a php file with auto_prepend_file in php.ini. phptop_hook.php generates some stats on how long it took the php file to process and stores this via error_log() which can then be queried with the perl script phptop.
zerodeux•22h ago
Author here.

"Query" does mean "HTTP request" in the summary. It's reported as "Hits" in the stats. Sorry for the incoherent wording ...

The SQL/wpdb support was added afterwards, and it shows because data is only collected but not used/displayed in the histograms.

Phptop is wayyy simpler and not even comparable to SPX, but you can install it in a few sec, use it 5min, uninstall it, and solve lots of common perf problem. That was my use case (it'as ancient code and I barely use it nowadays).

nchmy•19h ago
Thanks for the clarification!

What do you use now?