diff options
author | Kirill Zakharenko <earwin@gmail.com> | 2020-05-08 22:57:05 +0300 |
---|---|---|
committer | Kirill Zakharenko <earwin@gmail.com> | 2020-05-08 22:57:05 +0300 |
commit | 7037e6d7d13df6c72b836b689e96d0989408a910 (patch) | |
tree | 45055f6c06392b8ca3935649ab1c94932c3b3895 /include | |
parent | fd6df4d2ac16595e2ae9dd476eb6ad69a6968e3a (diff) | |
parent | 228535d9d5161b3405cf54d3f86e84cbb10e6222 (diff) |
Merge fairwaves/wip-stats into fairwaves/production
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/stats.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h index e01016d4..06918477 100644 --- a/include/osmocom/core/stats.h +++ b/include/osmocom/core/stats.h @@ -73,6 +73,7 @@ struct osmo_stats_reporter { char *bind_addr_str; /*!< local bind IP address */ int dest_port; /*!< destination (UDP) port */ int mtu; /*!< Maximum Transmission Unit */ + int flush_period; /*!< period between regular flushes */ /*! Maximum class/index to report. FIXME: More details! */ enum osmo_stats_class max_class; @@ -87,7 +88,8 @@ struct osmo_stats_reporter { int fd; /*!< file descriptor of socket */ struct msgb *buffer; /*!< message buffer for log output */ int agg_enabled; /*!< is aggregation enabled? */ - int force_single_flush; + int force_single_flush; /*!< set to 1 to force a flush (send even unchanged stats values) */ + int flush_period_counter; /*!< count sends between forced flushes */ struct llist_head list; int (*open)(struct osmo_stats_reporter *srep); @@ -129,6 +131,7 @@ int osmo_stats_reporter_set_max_class(struct osmo_stats_reporter *srep, int osmo_stats_reporter_set_name_prefix(struct osmo_stats_reporter *srep, const char *prefix); int osmo_stats_reporter_enable(struct osmo_stats_reporter *srep); int osmo_stats_reporter_disable(struct osmo_stats_reporter *srep); +int osmo_stats_reporter_set_flush_period(struct osmo_stats_reporter *srep, int period); /* reporter creation */ struct osmo_stats_reporter *osmo_stats_reporter_create_log(const char *name); |