From dfc08a869e98292c437a6a5f3b9b84cb9a6c72d2 Mon Sep 17 00:00:00 2001 From: Brandon Heller <brandonh@stanford.edu> Date: Fri, 5 Mar 2010 04:08:58 -0800 Subject: [PATCH] Add none test to measure MN creation/teardown time --- bin/mn | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/bin/mn b/bin/mn index 8c312d07..a6cf6abc 100755 --- a/bin/mn +++ b/bin/mn @@ -50,7 +50,8 @@ CONTROLLERS = { 'ref': Controller, 'none': lambda a, b: None } # optional tests to run -TESTS = [ 'cli', 'build', 'pingAll', 'pingPair', 'iperf', 'all', 'iperfUdp' ] +TESTS = [ 'cli', 'build', 'pingAll', 'pingPair', 'iperf', 'all', 'iperfUdp', + 'none' ] def buildTopo( topo ): @@ -218,16 +219,18 @@ class MininetRunner( object ): autoStaticArp=arp ) test = self.options.test - if test != 'build': - if test == 'cli': - mn.interact() - elif test == 'all': - mn.start() - mn.ping() - mn.iperf() - mn.stop() - else: - mn.run( test ) + if test == 'none': + mn.start() + mn.stop() + elif test == 'cli': + mn.interact() + elif test == 'all': + mn.start() + mn.ping() + mn.iperf() + mn.stop() + elif test != 'build': + mn.run( test ) elapsed = float( time.time() - start ) info( 'completed in %0.3f seconds\n' % elapsed ) -- GitLab