summaryrefslogtreecommitdiff
path: root/gsk/gskprofilerprivate.h
blob: ff71d4c94701ff5fe898c3de42350d0f98bf26d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef __GSK_PROFILER_PRIVATE_H__
#define __GSK_PROFILER_PRIVATE_H__

#include <glib-object.h>

G_BEGIN_DECLS

#define GSK_TYPE_PROFILER (gsk_profiler_get_type ())
G_DECLARE_FINAL_TYPE (GskProfiler, gsk_profiler, GSK, PROFILER, GObject)

GskProfiler *   gsk_profiler_new                (void);

GQuark          gsk_profiler_add_counter        (GskProfiler *profiler,
                                                 const char  *counter_name,
                                                 const char  *description,
                                                 gboolean     can_reset);
GQuark          gsk_profiler_add_timer          (GskProfiler *profiler,
                                                 const char  *timer_name,
                                                 const char  *description,
                                                 gboolean     invert,
                                                 gboolean     can_reset);

void            gsk_profiler_counter_inc        (GskProfiler *profiler,
                                                 GQuark       counter_id);
void            gsk_profiler_counter_add        (GskProfiler *profiler,
                                                 GQuark       counter_id,
                                                 gint64       increment);
void            gsk_profiler_counter_set        (GskProfiler *profiler,
                                                 GQuark       counter_id,
                                                 gint64       value);
void            gsk_profiler_timer_begin        (GskProfiler *profiler,
                                                 GQuark       timer_id);
gint64          gsk_profiler_timer_end          (GskProfiler *profiler,
                                                 GQuark       timer_id);
void            gsk_profiler_timer_set          (GskProfiler *profiler,
                                                 GQuark       timer_id,
                                                 gint64       value);

gint64          gsk_profiler_counter_get        (GskProfiler *profiler,
                                                 GQuark       counter_id);
gint64          gsk_profiler_timer_get          (GskProfiler *profiler,
                                                 GQuark       timer_id);
gint64          gsk_profiler_timer_get_start    (GskProfiler *profiler,
                                                 GQuark       timer_id);

void            gsk_profiler_reset              (GskProfiler *profiler);

void            gsk_profiler_push_samples       (GskProfiler *profiler);
void            gsk_profiler_append_counters    (GskProfiler *profiler,
                                                 GString     *buffer);
void            gsk_profiler_append_timers      (GskProfiler *profiler,
                                                 GString     *buffer);

G_END_DECLS

#endif /* __GSK_PROFILER_PRIVATE_H__ */