Way to add aritficial CPU load?

Is there a tried and true program to add aritifical CPU load to a system? I know I can do it by just using a while(1){} or something similar, but I didn't know if there was a well known, better way to do so?

There are a number of benchmarking programs that do it & show you the results, which is what I assume you're after. I've never used any, though. Just google benchmarking software if no one else contributes to the thread.

-r

Depends on what you're trying to do, let us know more and we can probably help you

I'm not looking for a benchmark. I have a program that I want to test under a variety of different CPU load situation. For example, I want to run my program and see how it performs , then I want to bog down the CPU a bit and run it again, and then bog does the CPU even more and run it again.

Let me know if you guys have any ideas.

shouldn't profiling software handle this?

I can beat that, cajones :)

.bat file:

:a

GOTO a

Can anyone beat 7 characters?

A lot of people use SETI@home for CPU load testing. Its free.

Prime95 is used by overclockers to test system stability.
It's a mosnter for system load testing. Also free.

Cool, thanks guys. I had been using something very similar to what cajones posted, and didn't know if there was a better way. I'll check out Prime95. Thanks again.

CPU stress a windows resurce kit utility

http://invaultech.com/files/cat/Hacks/CHINA_TOOLS/cpustres.exe

it's exactly what you need...

http://www.microsoft.com/resources/documentation/windows/2000/professional/reskit/en-us/part6/proch29.mspx

Go bannana!