Our business model requires you to charge users based on processor / usage hours.
At first I thought to just use StopWatch, and then use the elapsed time as a unit of measure.
But the problem that I see in this approach is that at a time when 5,000 users get to the server, the elapsed time for the same code fragment will be higher than at night, when only 50 users hit the server.
Another option is to charge users based on iterations performed on the data transmitted by users. There are also several problems with this approach.
- Some functions do not require any iteration over the data.
- CPU usage for
x + ylower than y x + y * z.
What is a good way to calculate CPU usage information in C # /. Net so that it remains the same for all users for the same operation regardless of server load?
Perhaps the total amount of actual build level instructions? Is there any way to get this information in C #?
What other recommendations can you provide?
Thanks for looking at this.
source
share