Make cell statistics useful in simulations again
Once upon a time, when I set "CellStatistics 1" in my torrc files, each relay in my TestingTorNetwork would track and write statistics to disk. Since writing these every 24 hours was too long for my simulations, I just needed to patch WRITE_STATS_INTERVAL to a smaller value (once per minute). Every new interval, a new entry would be appended to the stats files. These statistics are very useful in determining how our test network looks and how it compares to live Tor.
Somewhere along the line (in 0.2.3.x-alpha I think, but I can't find the ticket), the behavior changed so that each new entry replaces the existing file, presumably under the assumption that by that time the stats from the last entry were already sent to the authority and were no longer needed. Of course they weren't in my simulations, and only getting the last minute of statistics from each relay isn't nearly as useful.
Whats the best solution here? Is there another #define that I should patch so my relays upload stats every minute instead of the current rate? That will cause extra network load. Should we allow the option of appending statistics instead of replacing?
Ideally, I wouldn't have to patch anything and this would all be handled automatically if TestingTorNetwork is 1.