]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
make Simulator instance s global so that I can play with it in "python -i" after...
authorZooko O'Whielacronx <zooko@zooko.com>
Wed, 29 Nov 2006 11:28:51 +0000 (04:28 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Wed, 29 Nov 2006 11:28:51 +0000 (04:28 -0700)
simulator.py

index a93d44d0fd6851a335cb64e5ed1e0ed8a07b860d..a2c8e7af6412cfebbcdaf09440612fec536691c9 100644 (file)
@@ -236,12 +236,16 @@ class Simulator:
             avg_tried = sum(self.published_files) / len(self.published_files)
         print time, etype, self.added_data, self.failed_files, self.lost_data_bytes, avg_tried, len(self.queen.living_files), self.queen.utilization
 
+global s
+s = None
+
 def main():
 #    rrdtool.create("foo.rrd",
 #                   "--step 10",
 #                   "DS:files-added:DERIVE::0:1000",
 #                   "RRA:AVERAGE:1:1:1200",
 #                   )
+    global s
     s = Simulator()
     s.print_stats_header()
     for i in range(1000):
@@ -251,3 +255,5 @@ def main():
 
 if __name__ == '__main__':
     main()
+    
+