Announcing Tharsis.prof, a frame-based profiler in D.
A profiler as-a-library that keeps track of overhead of every
RAII-style API for recording profile data, and range-style API
for processing the results (with std.algorithm and the like - no
graphics interface yet).
No GC allocations (and no heap allocations either - user must
See example at:
Use case: my game has a rare lag that occurs once per minute.
Profiler is useless because the lag is averaged out. To solve
* Instrument code (add Zones, say, for rendering batches,
* Profile till the lag occurs.
* Get a range of frames (e.g. by filtering zones to get those
* Sort the range
* Get the longest frame
* Filter a range of all zones to get only those with start/end
time within the longest frame.
* Find the offending zone
Blog posts explaining what this is in detail (should be one post,
but it ended up being too long):
API docs (with examples):