summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-05-14 14:25:07 -0400
committerNick Mathewson <nickm@torproject.org>2018-05-14 14:25:07 -0400
commita394a2dd86579495797432114f62ea3265ed5ed0 (patch)
tree90da2ee5c31e850fb59ba978dcfaab1865f1945d /src/or/control.c
parenta9ef335c1b220ad632aad1d75f671a2fcd2b0863 (diff)
parentfd504587d56d4062bccb0d815f4fd925fb8eb33c (diff)
downloadtor-a394a2dd86579495797432114f62ea3265ed5ed0.tar.gz
tor-a394a2dd86579495797432114f62ea3265ed5ed0.zip
Merge branch 'bug25903_v5_squashed'
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 9323173f5d..0d637dce7a 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -265,6 +265,8 @@ clear_circ_bw_fields(void)
continue;
ocirc = TO_ORIGIN_CIRCUIT(circ);
ocirc->n_written_circ_bw = ocirc->n_read_circ_bw = 0;
+ ocirc->n_overhead_written_circ_bw = ocirc->n_overhead_read_circ_bw = 0;
+ ocirc->n_delivered_written_circ_bw = ocirc->n_delivered_read_circ_bw = 0;
}
SMARTLIST_FOREACH_END(circ);
}
@@ -5990,13 +5992,20 @@ control_event_circ_bandwidth_used(void)
tor_gettimeofday(&now);
format_iso_time_nospace_usec(tbuf, &now);
send_control_event(EVENT_CIRC_BANDWIDTH_USED,
- "650 CIRC_BW ID=%d READ=%lu WRITTEN=%lu "
- "TIME=%s\r\n",
+ "650 CIRC_BW ID=%d READ=%lu WRITTEN=%lu TIME=%s "
+ "DELIVERED_READ=%lu OVERHEAD_READ=%lu "
+ "DELIVERED_WRITTEN=%lu OVERHEAD_WRITTEN=%lu\r\n",
ocirc->global_identifier,
(unsigned long)ocirc->n_read_circ_bw,
(unsigned long)ocirc->n_written_circ_bw,
- tbuf);
+ tbuf,
+ (unsigned long)ocirc->n_delivered_read_circ_bw,
+ (unsigned long)ocirc->n_overhead_read_circ_bw,
+ (unsigned long)ocirc->n_delivered_written_circ_bw,
+ (unsigned long)ocirc->n_overhead_written_circ_bw);
ocirc->n_written_circ_bw = ocirc->n_read_circ_bw = 0;
+ ocirc->n_overhead_written_circ_bw = ocirc->n_overhead_read_circ_bw = 0;
+ ocirc->n_delivered_written_circ_bw = ocirc->n_delivered_read_circ_bw = 0;
}
SMARTLIST_FOREACH_END(circ);