[tor-bugs] #2551 [Metrics]: Torperf should output circuit build times

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Feb 24 11:38:01 UTC 2011


#2551: Torperf should output circuit build times
-----------------------------------------------------------------+----------
 Reporter:  mikeperry                                            |          Owner:  mikeperry   
     Type:  enhancement                                          |         Status:  needs_review
 Priority:  normal                                               |      Milestone:              
Component:  Metrics                                              |        Version:              
 Keywords:  TorPerfIteration20110305 MikePerryIteration20110305  |         Parent:              
   Points:  3                                                    |   Actualpoints:              
-----------------------------------------------------------------+----------

Comment(by mikeperry):

 Try:

 {{{
 diff --git a/TorCtl.py b/TorCtl.py
 index 4319242..5403a95 100755
 --- a/TorCtl.py
 +++ b/TorCtl.py
 @@ -266,8 +266,8 @@ class ORConnEvent(Event):
      self.ncircs = ncircs

  class StreamBwEvent(Event):
 -  def __init__(self, event_name, strm_id, written, read, body):
 -    Event.__init__(self, event_name, body)
 +  def __init__(self, event_name, saved_body, strm_id, written, read):
 +    Event.__init__(self, event_name, saved_body)
      self.strm_id = int(strm_id)
      self.bytes_read = int(read)
      self.bytes_written = int(written)
 @@ -1431,7 +1431,7 @@ class EventHandler(EventSink):
        m = re.match(r"(\d+)\s+(\d+)\s+(\d+)", body)
        if not m:
          raise ProtocolError("STREAM_BW event misformatted.")
 -      event = StreamBwEvent(evtype, *m.groups(), body=body)
 +      event = StreamBwEvent(evtype, body, *m.groups())
      elif evtype == "BW":
        m = re.match(r"(\d+)\s+(\d+)", body)
        if not m:
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2551#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list