Skip to content
Snippets Groups Projects
  1. Aug 04, 2011
    • Karsten Loesing's avatar
      Add unit tests for buffer-stats. · 3d3ed853
      Karsten Loesing authored
      Now that formatting the buffer-stats string is separate from writing
      it to disk, we can also decouple the logic to extract stats from
      circuits and finally write some unit tests for the history code.
      3d3ed853
    • Karsten Loesing's avatar
      Separate generation of a buffer-stats string from writing it to disk. · 07dc46e7
      Karsten Loesing authored
      The new rep_hist_format_buffer_stats() generates a buffer-stats string
      that rep_hist_buffer_stats_write() writes to disk.  All the state
      changing (e.g., resetting the buffer-stats history and initializing
      the next measurement interval) takes place in
      rep_hist_buffer_stats_write().  That allows us to finally test the
      buffer-stats code better.
      07dc46e7
    • Karsten Loesing's avatar
      Clean up rep_hist_buffer_stats_write(). · 95ebd01e
      Karsten Loesing authored
      We later want to split this function into one function that generates
      the buffer-stats string and one that writes it to disk.
      95ebd01e
    • Karsten Loesing's avatar
      Create cell-stats history even if we didn't see a single circuit. · 8f4e5fa2
      Karsten Loesing authored
      So far, if we didn't see a single circuit, we refrained from
      generating a cell-stats string and logged a warning.  Nobody will
      notice the warning, and people will wonder why there's no cell-stats
      string in the extra-info descriptor.  The better behavior is to
      generate a cell-stats string with all zeros.
      8f4e5fa2
    • Karsten Loesing's avatar
      Replace files in stats/ rather than appending to them. · a6a127c8
      Karsten Loesing authored
      Right now, we append statistics to files in the stats/ directory for
      half of the statistics, whereas we overwrite these files for the other
      half. In particular, we append buffer, dirreq, and entry stats and
      overwrite exit, connection, and bridge stats.
      
      Appending to files was useful when we didn't include stats in extra-info
      descriptors, because otherwise we'd have to copy them away to prevent
      Tor from overwriting them.
      
      But now that we include statistics in extra-info descriptors, it makes
      no sense to keep the old statistics forever. We should change the
      behavior to overwriting instead of appending for all statistics.
      
      Implements #2930.
      a6a127c8
  2. Aug 02, 2011
    • Nick Mathewson's avatar
      Implement protocol-type isolation correctly. · 6596aa02
      Nick Mathewson authored
      Previously we'd just looked at the connection type, but that's
      always CONN_TYPE_AP.  Instead, we should be looking at the type of
      the listener that created the connection.
      
      Spotted by rransom; fixes bug 3636.
      6596aa02
  3. Aug 01, 2011
  4. Jul 21, 2011
  5. Jul 20, 2011
  6. Jul 19, 2011
Loading