Move to kernel style SPDX license identifiers
[babeltrace.git] / src / plugins / utils / counter / counter.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
5 */
6
7 #ifndef BABELTRACE_PLUGINS_UTILS_COUNTER_H
8 #define BABELTRACE_PLUGINS_UTILS_COUNTER_H
9
10 #include <glib.h>
11 #include <babeltrace2/babeltrace.h>
12 #include <stdbool.h>
13 #include <stdint.h>
14 #include "common/macros.h"
15
16 struct counter {
17 bt_message_iterator *msg_iter;
18 struct {
19 uint64_t event;
20 uint64_t stream_begin;
21 uint64_t stream_end;
22 uint64_t packet_begin;
23 uint64_t packet_end;
24 uint64_t disc_events;
25 uint64_t disc_packets;
26 uint64_t msg_iter_inactivity;
27 uint64_t other;
28 } count;
29 uint64_t last_printed_total;
30 uint64_t at;
31 uint64_t step;
32 bool hide_zero;
33 bt_logging_level log_level;
34 bt_self_component *self_comp;
35 };
36
37 BT_HIDDEN
38 bt_component_class_initialize_method_status counter_init(
39 bt_self_component_sink *component,
40 bt_self_component_sink_configuration *config,
41 const bt_value *params, void *init_method_data);
42
43 BT_HIDDEN
44 void counter_finalize(bt_self_component_sink *component);
45
46 BT_HIDDEN
47 bt_component_class_sink_graph_is_configured_method_status counter_graph_is_configured(
48 bt_self_component_sink *component);
49
50 BT_HIDDEN
51 bt_component_class_sink_consume_method_status counter_consume(bt_self_component_sink *component);
52
53 #endif /* BABELTRACE_PLUGINS_UTILS_COUNTER_H */
This page took 0.029483 seconds and 4 git commands to generate.