Commit Graph

7 Commits

Author SHA1 Message Date
Alexander Larsson
cc643df88b Convert all profiler times from nsec to usec
usec is the scale of the monotonic timer which is where we get almost
all the times from. The only actual source of nsec is the opengl
GPU time (but who knows what the actual resulution of that is).

Changing this to usec allows us to get rid of " * 1000" in a *lot* of
places all over the codebase, which are ugly and confusing.
2020-02-12 10:44:17 +01:00
Matthias Clasen
c541fa9555 gsk: Add some more profiler apis
Add a way to extract the start time of timers.
This will let us reuse the profiler timers for tracing.
2019-05-07 09:37:59 -07:00
Руслан Ижбулатов
10b2f6540a Fix wrong format strings in various places 2018-06-10 21:20:59 +00:00
Matthias Clasen
767966933d gsk: Redo the sampling in the profiler
Reset the min/max/average counters before calculating,
and only print the values if we have samples. In addition,
print the number of samples.
2017-09-28 10:25:49 -04:00
Matthias Clasen
cfbd6b4b99 gsk: Add a way to reset profiler counters
It is often useful to count things per-frame, and reset
the counter afterwards.
2017-09-25 20:58:10 -04:00
Matthias Clasen
816b47d70d gsk: Make profiler counters more useful
Make it possible to have counters that get incremented
by values other than 1.
2017-09-25 17:03:06 -04:00
Emmanuele Bassi
005fea59b6 gsk: Add profiler object
The GskProfiler holds counters and timers, and will be used by the
renderer implementations to acquire frame timings.
2016-10-18 11:49:10 +01:00