Get the latest tech news
How to waste CPU like a Professional
In this week's blog post, you'll learn seven different ways to waste a specific amount of CPU-time. Number seven will surprise you.
As a short backstory, my profiler needed a test to check that the queue size of the sampler really increased dynamically (see Java 25’s new CPU-Time Profiler: Queue Sizing (3)), so I needed a way to let a thread spend a pre-defined number of seconds running natively on the CPU. After all the previous solutions, you might ask yourself: Couldn’t the operating system just signal me after a fixed number of seconds, so my user-land program can focus on the most important task of idly looping? Palace Church in Rastatt This blog post is part of my work in the SapMachine team at SAP, making profiling easier for everyone.
Or read this on Hacker News