Larry O'Brien explains how he unit tested his way to solving a performance problem. This part of his exploration is something I've learned the hard way:
As the race condition clobbered more threads, though, the relative amount of time each remaining thread spent inside the critical section decreased! Eventually the system would degrade to one or two threads, providing the illusion that the system was “limping along.” And making me ass-u-me that the problem had to do with the database.
That last sentence is the key thing: Most of us don't guess the problem at all well. Tools - whether tests or profilers (or, more likely, both) - help us identify the real problems.
Technorati Tags:
testing, profiling, software development