diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-02-11 17:16:09 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-06-24 16:01:56 +0100 |
commit | cf08dce40281fa128f717b33c64c165cbcd753f6 (patch) | |
tree | 8964357c20cc863492158247823737615d2a0ca5 /bus/stats.c | |
parent | f69ac31dd940181a07daa9d00e5e83920b1fa1a0 (diff) | |
download | dbus-cf08dce40281fa128f717b33c64c165cbcd753f6.tar.gz dbus-cf08dce40281fa128f717b33c64c165cbcd753f6.tar.bz2 dbus-cf08dce40281fa128f717b33c64c165cbcd753f6.zip |
Also record peak values for queued bytes/fds in connection stats
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
Diffstat (limited to 'bus/stats.c')
-rw-r--r-- | bus/stats.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bus/stats.c b/bus/stats.c index d395bc0e..28fd49ba 100644 --- a/bus/stats.c +++ b/bus/stats.c @@ -261,8 +261,8 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection, DBusMessage *reply = NULL; DBusMessageIter iter, arr_iter; static dbus_uint32_t stats_serial = 0; - dbus_uint32_t in_messages, in_bytes, in_fds; - dbus_uint32_t out_messages, out_bytes, out_fds; + dbus_uint32_t in_messages, in_bytes, in_fds, in_peak_bytes, in_peak_fds; + dbus_uint32_t out_messages, out_bytes, out_fds, out_peak_bytes, out_peak_fds; BusRegistry *registry; BusService *service; DBusConnection *stats_connection; @@ -313,14 +313,20 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection, _dbus_connection_get_stats (stats_connection, &in_messages, &in_bytes, &in_fds, - &out_messages, &out_bytes, &out_fds); + &in_peak_bytes, &in_peak_fds, + &out_messages, &out_bytes, &out_fds, + &out_peak_bytes, &out_peak_fds); if (!asv_add_uint32 (&iter, &arr_iter, "IncomingMessages", in_messages) || !asv_add_uint32 (&iter, &arr_iter, "IncomingBytes", in_bytes) || !asv_add_uint32 (&iter, &arr_iter, "IncomingFDs", in_fds) || + !asv_add_uint32 (&iter, &arr_iter, "PeakIncomingBytes", in_peak_bytes) || + !asv_add_uint32 (&iter, &arr_iter, "PeakIncomingFDs", in_peak_fds) || !asv_add_uint32 (&iter, &arr_iter, "OutgoingMessages", out_messages) || !asv_add_uint32 (&iter, &arr_iter, "OutgoingBytes", out_bytes) || - !asv_add_uint32 (&iter, &arr_iter, "OutgoingFDs", out_fds)) + !asv_add_uint32 (&iter, &arr_iter, "OutgoingFDs", out_fds) || + !asv_add_uint32 (&iter, &arr_iter, "PeakOutgoingBytes", out_peak_bytes) || + !asv_add_uint32 (&iter, &arr_iter, "PeakOutgoingFDs", out_peak_fds)) goto oom; /* end */ |