[tor-commits] [torspec/master] Add timestamps to the CIRC_BW and STREAM_BW events.

nickm at torproject.org nickm at torproject.org
Fri Sep 15 15:53:05 UTC 2017


commit 00b9dafcf306f61d527ae6bdb9b3e842aa64a1c3
Author: Donncha O'Cearbhaill <donncha at donncha.is>
Date:   Fri Jun 3 11:01:58 2016 +0100

    Add timestamps to the CIRC_BW and STREAM_BW events.
    
    Resolves ticket 19254.
---
 control-spec.txt | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/control-spec.txt b/control-spec.txt
index 275221c..9f99a0d 100644
--- a/control-spec.txt
+++ b/control-spec.txt
@@ -2635,9 +2635,11 @@
 4.1.13. Bandwidth used on an application stream
 
   The syntax is:
-     "650" SP "STREAM_BW" SP StreamID SP BytesWritten SP BytesRead CRLF
+     "650" SP "STREAM_BW" SP StreamID SP BytesWritten SP BytesRead SP
+              Time CRLF
      BytesWritten = 1*DIGIT
      BytesRead = 1*DIGIT
+     Time = ISOTime2Frac
 
   BytesWritten and BytesRead are the number of bytes written and read
   by the application since the last STREAM_BW event on this stream.
@@ -2646,6 +2648,9 @@
   that the application *wrote* the byte. That's why the order of "written"
   vs "read" is opposite for stream_bw events compared to bw events.
 
+  The Time field is provided only in versions 0.3.2.1-alpha and later. It
+  records when Tor created the bandwidth event.
+
   These events are generated about once per second per stream; no events
   are generated for streams that have not written or read. These events
   apply only to streams entering Tor (such as on a SOCKSPort, TransPort,
@@ -2838,14 +2843,18 @@
 
   The syntax is:
      "650" SP "CIRC_BW" SP "ID=" CircuitID SP "READ=" BytesRead SP
-              "WRITTEN=" BytesWritten CRLF
+              "WRITTEN=" BytesWritten SP "TIME=" Time CRLF
      BytesRead = 1*DIGIT
      BytesWritten = 1*DIGIT
+     Time = ISOTime2Frac
 
   BytesRead and BytesWritten are the number of bytes read and written by
   all applications with streams attached to this circuit since the last
   CIRC_BW event.
 
+  The Time field is provided only in versions 0.3.2.1-alpha and later. It
+  records when Tor created the bandwidth event.
+
   These events are generated about once per second per circuit; no events
   are generated for circuits that had no attached stream writing or
   reading.





More information about the tor-commits mailing list