performance_index/0 is an Erlang function exported by "" module. High resolution performance index expressed as floating-point time-stamp in seconds with nanosecond precision. This counter is read directly from the hardware or operating system with the same guarantees. This means that two consecutive calls to the function are not guaranteed to be monotonic, though it most likely will be. Furthermore, you can measure the deviation between two performance call by subtract the performance indexes of these calls. The results is calculated as floating-point seconds with precision in nanoseconds. The code sample below shows one practical measurement of two consecutive calls executed in 2.0876779 seconds. Such result could be easily rounded up, for example, up to 2 seconds and 88 milliseconds. |
|