Add none test to measure MN creation/teardown time

This commit is contained in:
Brandon Heller
2010-03-05 04:08:58 -08:00
parent c8641d7d15
commit dfc08a869e
+14 -11
View File
@@ -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 )