Universal profiler for code profiling in Delphi and Lazarus.
Supported operating systems: Windows/Linux.
To use the profiler:
- connect this module to the profiled module
- to create a code block profile, place this calls on its edges
uprof.Start('section name') // to start profiling
... profiled code here
uprof.Stop // to end profiling - save the accumulated statistics to an external file
uprof.SaveToFile(path to file) - use THash returned by Start() function and GetProfileValue function to get current counter values.
The counter values have an accuracy of 100 nanoseconds.
To convert to seconds, divide this value by the Frequency parameter.