How does SalesForce calculate the CPU Time that was introduced in Winter '14? I am seeing varying results from it. Why does the CPU count vary?
I am running a single block of code over and over again in an org with all triggers disabled. There's only a small amount of code executing ( < 100 lines). Im finding that the Limits are all consistently producing the same results except for the CPU time which is varying by as much as 200 milliseconds.
CPU Time for each run of the code:
- Maximum CPU time: 598 out of 10000
- Maximum CPU time: 599 out of 10000
- Maximum CPU time: 618 out of 10000
- Maximum CPU time: 602 out of 10000
- Maximum CPU time: 620 out of 10000
- Maximum CPU time: 595 out of 10000
- Maximum CPU time: 791 out of 10000 <- Highest CPU time
- Maximum CPU time: 590 out of 10000 <- Lowest CPU time
- Maximum CPU time: 581 out of 10000
- Maximum CPU time: 697 out of 10000
- Maximum CPU time: 597 out of 10000
- Maximum CPU time: 687 out of 10000
- Maximum CPU time: 658 out of 10000
- Maximum CPU time: 595 out of 10000
- Maximum CPU time: 620 out of 10000
- Maximum CPU time: 593 out of 10000
- Maximum CPU time: 612 out of 10000
The rest of the limits that never change:
- Number of SOQL queries: 2 out of 100
- Number of query rows: 572 out of 50000
- Number of SOSL queries: 0 out of 20
- Number of DML statements: 2 out of 1150
- Number of DML rows: 572 out of 10000
- Number of script statements: 680 out of 200000
- Maximum heap size: 5433 out of 6000000
- Number of callouts: 0 out of 10
- Number of Email Invocations: 0 out of 10
- Number of fields describes: 0 out of 100
- Number of record type describes: 0 out of 100
- Number of child relationships describes: 0 out of 100
- Number of picklist describes: 0 out of 100
- Number of future calls: 0 out of 10