Ticket #131 (new todo)
Opened 3 years ago
runtime profiler
| Reported by: | ct | Owned by: | ct |
|---|---|---|---|
| Priority: | normal | Milestone: | 0integration |
| Component: | lumieraBack | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: |
Description
A generic runtime profiler needs to be brainstormed, designed and implemented.
Just a first sketch:
We need to profile tasks for worst/average/best times. To catch measuring errors and extremes, best and worst shall slowly (configureable) diverge towards average.
We also need to maintain a 'target' time, as kindof 'working average', this is just a factor (starting at 1.0) over average, but we keep a hit/miss statistic and increment/decrement this factor accordingly to get some reasonable value to estimate tasks.
The same 'task' may define different multiple profiling categories, for example if a frame is requested then it must be either rendered or fetched from cache. We are interested in statistics how long it takes to fetch a frame from cache or either how long rendering takes, but not an average where cache is the best and rendering is the worst.
This needs to be implemented with Posix realtime clocks and be sufficiently efficent. I gave a float as example above, a real implementation may try integer/fixed point arithmetic.
