Module:Timing/doc: Difference between revisions

Content deleted Content added
No edit summary
Line 1:
:''Note that the module is not ready for production, it is still under (somewhat) active development!''
 
The purpose of this module is to provide a simple method to do timing analysis for [[w:en:performance tuning|performance tuning]] of Lua-functions, that is [[w:en:Profiling (computer programming)|profiling of functions]], as. inUsually measuring the duration of function calls, sois itpart isof a larger possibleeffort to identify bottlenecks and problematic code. ItThis is not a full-blown profiler, as it is not possible to do line-tracing (call-graph profiling) in the current setup. Its only purpose is to measure execution time (flat profiling), and to do this interactively from the debug console (ie. on a single function).
 
The profiler is called with at least an executable function, and optionally a count (size, default 100) of each test set and a number of such test sets (default 10). The total number of calls will be ''count × sets'' and gives the mean runtime for the function. The standard deviation is calculated from the number of ''sets'' and will only be a coarse estimate. If only run with a single set the standard deviation will go away, but even if it isn't measured the execution time will still vary.