Add none test to measure MN creation/teardown time
This commit is contained in:
@@ -50,7 +50,8 @@ CONTROLLERS = { 'ref': Controller,
|
|||||||
'none': lambda a, b: None }
|
'none': lambda a, b: None }
|
||||||
|
|
||||||
# optional tests to run
|
# optional tests to run
|
||||||
TESTS = [ 'cli', 'build', 'pingAll', 'pingPair', 'iperf', 'all', 'iperfUdp' ]
|
TESTS = [ 'cli', 'build', 'pingAll', 'pingPair', 'iperf', 'all', 'iperfUdp',
|
||||||
|
'none' ]
|
||||||
|
|
||||||
|
|
||||||
def buildTopo( topo ):
|
def buildTopo( topo ):
|
||||||
@@ -218,16 +219,18 @@ class MininetRunner( object ):
|
|||||||
autoStaticArp=arp )
|
autoStaticArp=arp )
|
||||||
|
|
||||||
test = self.options.test
|
test = self.options.test
|
||||||
if test != 'build':
|
if test == 'none':
|
||||||
if test == 'cli':
|
mn.start()
|
||||||
mn.interact()
|
mn.stop()
|
||||||
elif test == 'all':
|
elif test == 'cli':
|
||||||
mn.start()
|
mn.interact()
|
||||||
mn.ping()
|
elif test == 'all':
|
||||||
mn.iperf()
|
mn.start()
|
||||||
mn.stop()
|
mn.ping()
|
||||||
else:
|
mn.iperf()
|
||||||
mn.run( test )
|
mn.stop()
|
||||||
|
elif test != 'build':
|
||||||
|
mn.run( test )
|
||||||
|
|
||||||
elapsed = float( time.time() - start )
|
elapsed = float( time.time() - start )
|
||||||
info( 'completed in %0.3f seconds\n' % elapsed )
|
info( 'completed in %0.3f seconds\n' % elapsed )
|
||||||
|
|||||||
Reference in New Issue
Block a user