I am currently working on a small internal testing application to create several types of computer load so that we can see how our software works under load. I get a hang on one request, since I am making a way to indicate the percentage of processor usage (say, 40%) before the user starts the program, and, I hope, will keep the processor in the range of + - 10% of what they invested. I was told that they had seen programs before, but everything that I saw, which claimed to be so, did not work. I am trying to read average usage and the sleep thread works so that the CPU load is reduced, but I found that this is not accurate. It will also be used on several servers, each of which has different processors, so I can not do very hard coding,since it should work on every server. I personally do not think that it can be done exactly, but I ask here, as a last effort, to see if other software like this is similar to someone, and knows how it will be written.
Edit: I tried using a thread with a lower priority, and was also told that it would not be useful to them (although I had an option created just for testing purposes, before it was requested by me).
source
share