java - design a test program: increase/decrease cpu usage -
java - design a test program: increase/decrease cpu usage -
i trying design , write java programme can increase/decrease cpu usage. here basic idea: write multi-thread program. , each thread float point calculation. increase/decrease cpu usage through adding/reducing threads.
i not sure kinds of float point operations best in test case. especially, gonna test vmware virtual machine.
you can sum reciprocals of natural numbers. since sum doesn't converge, compiler not dare optimize away. create sure result somehow used in end.
1/1 + 1/2 + 1/3 + 1/4 + 1/5 ...
this of course of study occupy floating point unit, not central processing unit. if approach or not main question should pose.
java design testing implementation
Comments
Post a Comment