From: Zooko O'Whielacronx Date: Wed, 29 Nov 2006 11:28:51 +0000 (-0700) Subject: make Simulator instance s global so that I can play with it in "python -i" after... X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~550 X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/frontends/%22doc.html/reliability?a=commitdiff_plain;h=1fd3e1f2903c54d3b1025e82a978369a55948360;p=tahoe-lafs%2Ftahoe-lafs.git make Simulator instance s global so that I can play with it in "python -i" after main() has exited --- diff --git a/simulator.py b/simulator.py index a93d44d0..a2c8e7af 100644 --- a/simulator.py +++ b/simulator.py @@ -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() + +