From 1267ff59499e1d3a0de9b05b84f58d65db684c1e Mon Sep 17 00:00:00 2001 From: Tushar Krishna Date: Sat, 7 May 2011 17:43:30 -0400 Subject: NetworkTest: added sim_cycles parameter to the network tester. The network tester terminates after injecting for sim_cycles (default=1000), instead of having to explicitly pass --maxticks from the command line as before. If fixed_pkts is enabled, the tester only injects maxpackets number of packets, else it keeps injecting till sim_cycles. The tester also works with zero command line arguments now. --- configs/example/ruby_network_test.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'configs') diff --git a/configs/example/ruby_network_test.py b/configs/example/ruby_network_test.py index 6abf50561..ebc271208 100644 --- a/configs/example/ruby_network_test.py +++ b/configs/example/ruby_network_test.py @@ -61,6 +61,9 @@ parser.add_option("--precision", type="int", default=3, help="Number of digits of precision after decimal point\ for injection rate") +parser.add_option("--sim-cycles", type="int", default=1000, + help="Number of simulation cycles") + parser.add_option("--fixed-pkts", action="store_true", help="Network_test: send only -p number of packets") @@ -88,8 +91,10 @@ if options.num_cpus > block_size: % (options.num_cpus, block_size) sys.exit(1) + cpus = [ NetworkTest(fixed_pkts=options.fixed_pkts, \ max_packets=options.maxpackets, \ + sim_cycles=options.sim_cycles, \ traffic_type=options.synthetic, \ inj_rate=options.injectionrate, \ precision=options.precision, \ -- cgit v1.2.3