refactored
diff --git a/TestON/tests/flowTP1g/flowTP1g.params b/TestON/tests/flowTP1g/flowTP1g.params
index 5771a62..bb05f0e 100644
--- a/TestON/tests/flowTP1g/flowTP1g.params
+++ b/TestON/tests/flowTP1g/flowTP1g.params
@@ -1,29 +1,28 @@
<PARAMS>
- <testcases>1,3</testcases>
+ <testcases>1,2</testcases>
- <isOnBaremetal>true</isOnBaremetal>
- <SCALE>1</SCALE>
+ <isOnBaremetal>False</isOnBaremetal>
+ <SCALE>7</SCALE>
<availableNodes>7</availableNodes>
<ENV>
<cellName>flowTP</cellName>
- <cellFeatures>webconsole,onos-core,onos-api,onos-cli,onos-null,onos-app-demo,onos-rest,onos-app-metrics,onos-app-metrics-intent,onos-app-metrics-topology</cellFeatures>
+ <cellApps>null,demo</cellApps>
</ENV>
<TEST>
<skipCleanInstall>yes</skipCleanInstall>
- <warmUp>4</warmUp> #number of runs to warm up the system
- <sampleSize>20</sampleSize> #number of runs to take data from
- <neighbors>4,2,0</neighbors> #list of number of neighbors
- <servers>7,5,3,1</servers> #list of servers
- <flows>122500</flows>
+ <warmUp>4</warmUp> #number of runs to warm up the system
+ <sampleSize>2</sampleSize> #number of runs to take data from
+ <neighbors>0,a</neighbors> #list of number of neighbors, a = all
+ <flows>3500</flows>
<switches>35</switches>
- <testCMD0>flow-tester.py -f</testCMD0> #base command
- <testCMD1> -n </testCMD1> #neighbors
+ <testCMD0>flow-tester.py -f</testCMD0> #base command
+ <testCMD1> -n </testCMD1> #neighbors
</TEST>
@@ -35,36 +34,36 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.254.1.201</ip1>
+ <ip1>10.128.5.51</ip1>
<port1>6633</port1>
- <ip2>10.254.1.202</ip2>
+ <ip2>10.128.5.52</ip2>
<port2>6633</port2>
- <ip3>10.254.1.203</ip3>
+ <ip3>10.128.5.53</ip3>
<port3>6633</port3>
- <ip4>10.254.1.204</ip4>
+ <ip4>10.128.5.54</ip4>
<port4>6633</port4>
- <ip5>10.254.1.205</ip5>
+ <ip5>10.128.5.65</ip5>
<port5>6633</port5>
- <ip6>10.254.1.206</ip6>
+ <ip6>10.128.5.66</ip6>
<port6>6633</port6>
- <ip7>10.254.1.207</ip7>
+ <ip7>10.128.5.67</ip7>
<port7>6633</port7>
</CTRL>
<MN>
- <ip1>10.254.1.200</ip1>
+ <ip1>10.128.5.55</ip1>
</MN>
<BENCH>
<user>admin</user>
- <ip1>10.254.1.200</ip1>
+ <ip1>10.128.5.55</ip1>
</BENCH>
<JSON>
diff --git a/TestON/tests/flowTP1g/flowTP1g.py b/TestON/tests/flowTP1g/flowTP1g.py
index 8261a47..946864c 100644
--- a/TestON/tests/flowTP1g/flowTP1g.py
+++ b/TestON/tests/flowTP1g/flowTP1g.py
@@ -13,63 +13,52 @@
def __init__( self ):
self.default = ''
- def CASE1( self, main ): #This is the initialization case
- #this case will clean up all nodes
- #but only node 1 is started in this case
-
- global clusterCount #number of nodes running
- global ONOSIp #list of ONOS IP addresses
- clusterCount = 1
- ONOSIp = [ 0 ]
+ def CASE1( self, main ):
+ import time
+ global init
+ try:
+ if type(init) is not bool:
+ init = False
+ except NameError:
+ init = False
#Load values from params file
checkoutBranch = main.params[ 'GIT' ][ 'checkout' ]
gitPull = main.params[ 'GIT' ][ 'autopull' ]
cellName = main.params[ 'ENV' ][ 'cellName' ]
- Features= main.params[ 'ENV' ][ 'cellFeatures' ]
+ Apps = main.params[ 'ENV' ][ 'cellApps' ]
BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
BENCHUser = main.params[ 'BENCH' ][ 'user' ]
MN1Ip = main.params[ 'MN' ][ 'ip1' ]
maxNodes = int(main.params[ 'availableNodes' ])
- Features = main.params[ 'ENV' ][ 'cellFeatures' ]
skipMvn = main.params[ 'TEST' ][ 'skipCleanInstall' ]
-
- main.ONOSbench.handle.sendline("export TERM=vt100")
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
+
+ #----do i need this line?
+ #main.ONOSbench.handle.sendline("export TERM=vt100")
- #Populate ONOSIp with ips from params
- for i in range(1, maxNodes + 1):
- ipString = 'ip' + str(i)
- ONOSIp.append(main.params[ 'CTRL' ][ ipString ])
+ # -- INIT SECTION, ONLY RUNS ONCE -- #
+ if init == False:
+ init = True
+ global clusterCount #number of nodes running
+ global ONOSIp #list of ONOS IP addresses
+ global scale
- #kill off all onos processes
- main.log.step("Safety check, killing all ONOS processes")
- main.log.step("before initiating enviornment setup")
- for node in range(1, maxNodes + 1):
- main.ONOSbench.onosDie(ONOSIp[node])
+ clusterCount = 0
+ ONOSIp = [ 0 ]
+ scale = (main.params[ 'SCALE' ]).split(",")
+ clusterCount = int(scale[0])
+ #Populate ONOSIp with ips from params
+ for i in range(1, maxNodes + 1):
+ ipString = 'ip' + str(i)
+ ONOSIp.append(main.params[ 'CTRL' ][ ipString ])
- #construct the cell file
- main.log.info("Creating initial cell file")
- exec "a = main.ONOSbench.createCellFile"
- cellIp = []
- for node in range(1, 2):
- #for node in range (1, maxNodes + 1):
- cellIp.append(ONOSIp[node])
- a(BENCHIp,cellName,MN1Ip,str(Features), *cellIp)
+ #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
+ if skipMvn != "yes":
+ mvnResult = main.ONOSbench.cleanInstall()
- main.log.info(cellIp)
-
- #Uninstall everywhere
- #main.log.step( "Cleaning Enviornment..." )
- #for i in range(1, maxNodes + 1):
- # main.log.info(" Uninstalling ONOS " + str(i) )
- # main.ONOSbench.onosUninstall( ONOSIp[i] )
-
- #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
- if skipMvn != "yes":
- mvnResult = main.ONOSbench.cleanInstall()
-
#git
main.step( "Git checkout and pull " + checkoutBranch )
if gitPull == 'on':
@@ -81,53 +70,64 @@
pullResult = main.TRUE
main.log.info( "Skipped git checkout and pull" )
+ # -- END OF INIT SECTION --#
- #main.step( "Set cell for ONOS cli env" )
- #main.ONOS1cli.setCell( cellName )
+ clusterCount = int(scale[0])
+ scale.remove(scale[0])
+ main.log.info("CLUSTER COUNT: " + str(clusterCount))
+
+ #kill off all onos processes
+ main.log.step("Safety check, killing all ONOS processes")
+ main.log.step("before initiating enviornment setup")
+ for node in range(1, maxNodes + 1):
+ main.ONOSbench.onosDie(ONOSIp[node])
+
+ #Uninstall everywhere
+ main.log.step( "Cleaning Enviornment..." )
+ for i in range(1, maxNodes + 1):
+ main.log.info(" Uninstalling ONOS " + str(i) )
+ main.ONOSbench.onosUninstall( ONOSIp[i] )
+
+ #construct the cell file
+ main.log.info("Creating cell file")
+ cellIp = []
+ for node in range (1, clusterCount + 1):
+ cellIp.append(ONOSIp[node])
+ main.ONOSbench.createCellFile(BENCHIp,cellName,MN1Ip,str(Apps), *cellIp)
+ main.log.info("Cell Ip list: " + str(cellIp))
+
+ main.step( "Set Cell" )
+ main.ONOSbench.setCell(cellName)
+
main.step( "Creating ONOS package" )
packageResult = main.ONOSbench.onosPackage()
- #main.step( "Installing ONOS package" )
- #install1Result = main.ONOSbench.onosInstall( node=ONOSIp[1] )
-
- cellName = main.params[ 'ENV' ][ 'cellName' ]
- main.step( "Applying cell file to environment" )
- cellApplyResult = main.ONOSbench.setCell( cellName )
main.step( "verify cells" )
verifyCellResult = main.ONOSbench.verifyCell()
- #main.step( "Set cell for ONOS cli env" )
- #cli1 = main.ONOS1cli.startOnosCli( node=ONOSIp[1] )
+ main.log.report( "Initializeing " + str( clusterCount ) + " node cluster." )
+ for node in range(1, clusterCount + 1):
+ main.log.info("Starting ONOS " + str(node) + " at IP: " + ONOSIp[node])
+ main.ONOSbench.onosInstall( ONOSIp[node])
- def CASE2( self, main ):
- # This case increases the cluster size by whatever scale is
- # Note: 'scale' is the size of the step
- # if scaling is not a part of your test, simply run this case
- # once after CASE1 to set up your enviornment for your desired
- # cluster size. If scaling is a part of you test call this case each time
- # you want to increase cluster size
-
- ''
- 'Increase number of nodes and initiate CLI'
- ''
- import time
- global clusterCount
-
- scale = int( main.params[ 'SCALE' ] )
- clusterCount += scale
-
- main.log.report( "Increasing cluster size to " + str( clusterCount ) )
- for node in range((clusterCount - scale) + 1, clusterCount + 1):
- main.ONOSbench.onosDie(ONOSIp[node])
- time.sleep(10)
- main.log.info("Starting ONOS " + str(node) + " at IP: " + ONOSIp[node])
- main.ONOSbench.onosInstall( node=ONOSIp[node])
+ for node in range(1, clusterCount + 1):
+ for i in range( 2 ):
+ isup = main.ONOSbench.isup( ONOSIp[node] )
+ if isup:
+ main.log.info("ONOS " + str(node) + " is up\n")
+ break
+ if not isup:
+ main.log.report( "ONOS " + str(node) + " didn't start!" )
+
+ for node in range(1, clusterCount + 1):
exec "a = main.ONOS%scli.startOnosCli" %str(node)
a(ONOSIp[node])
-
-
- def CASE3( self, main ):
+
+ main.log.info("Startup sequence complete")
+
+
+ def CASE2( self, main ):
#
# This is the flow TP test
#
@@ -142,27 +142,26 @@
warmUp = int(main.params[ 'TEST' ][ 'warmUp' ])
sampleSize = int(main.params[ 'TEST' ][ 'sampleSize' ])
switches = int(main.params[ 'TEST' ][ 'switches' ])
- neighborList = main.params[ 'TEST' ][ 'neighbors' ]
- serverList = main.params[ 'TEST' ][ 'servers' ]
- #flows = int(main.params[ 'TEST' ][ 'flows' ])
+ neighborList = (main.params[ 'TEST' ][ 'neighbors' ]).split(",")
testCMD[0] = main.params[ 'TEST' ][ 'testCMD0' ]
testCMD[1] = main.params[ 'TEST' ][ 'testCMD1' ]
maxNodes = main.params[ 'availableNodes' ]
onBaremetal = main.params['isOnBaremetal']
-
cellName = main.params[ 'ENV' ][ 'cellName' ]
- Features= main.params[ 'ENV' ][ 'cellFeatures' ]
BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
BENCHUser = main.params[ 'BENCH' ][ 'user' ]
MN1Ip = main.params[ 'MN' ][ 'ip1' ]
maxNodes = int(main.params[ 'availableNodes' ])
- Features = main.params[ 'ENV' ][ 'cellFeatures' ]
homeDir = os.path.expanduser('~')
-
- serverList = serverList.split(",")
- main.log.info("serverlist: " + str(serverList))
- neighborList = neighborList.split(",")
+
+ servers = str(clusterCount)
+ for i in range(0, len(neighborList)):
+ if neighborList[i] == 'a':
+ neighborList[i] = str(clusterCount - 1)
+
+ if clusterCount == 1:
+ neighborList = ['0']
main.log.info("neightborlist: " + str(neighborList))
ts = time.time()
@@ -191,222 +190,170 @@
serviceConfig.close()
for n in neighborList:
- for servers in serverList:
- main.log.step("\tSTARTING TEST")
- main.log.step("\tSERVERS: \t" + servers )
- main.log.step("\tNEIGHBORS:\t" + n )
- main.log.info("=============================================================")
- main.log.info("=============================================================")
- #write file to configure nil link
- ipCSV = ""
- for i in range (1, int(maxNodes) + 1):
- tempstr = "ip" + str(i)
- ipCSV += main.params[ 'CTRL' ][ tempstr ]
- if i < int(maxNodes):
- ipCSV +=","
-
- filename = "/onos/tools/package/etc/org.onosproject.provider.nil.link.impl.NullLinkProvider.cfg"
- linkConfig = open(homeDir + filename,'w+')
- linkConfig.write("# eventRate = 2000\n")
- linkConfig.write("neighbors = " + ipCSV)
- main.log.info(" NullLinkProvider.cfg: " + ipCSV)
- linkConfig.close()
-
-
- #write file for null device
- filename = "/onos/tools/package/etc/org.onosproject.provider.nil.device.impl.NullDeviceProvider.cfg"
- deviceConfig = open(homeDir + filename,'w+')
+ main.log.step("\tSTARTING TEST")
+ main.log.step("\tLOADING FROM SERVERS: \t" + str(clusterCount) )
+ main.log.step("\tNEIGHBORS:\t" + n )
+ main.log.info("=============================================================")
+ main.log.info("=============================================================")
+ #write file to configure nil link
+ ipCSV = ""
+ for i in range (1, int(maxNodes) + 1):
+ tempstr = "ip" + str(i)
+ ipCSV += main.params[ 'CTRL' ][ tempstr ]
+ if i < int(maxNodes):
+ ipCSV +=","
- serversToRun = max(int(servers), (int(n) + 1))
+ filename = "/onos/tools/package/etc/org.onosproject.provider.nil.link.impl.NullLinkProvider.cfg"
+ linkConfig = open(homeDir + filename,'w+')
+ linkConfig.write("# eventRate = 2000\n")
+ linkConfig.write("neighbors = " + ipCSV)
+ main.log.info(" NullLinkProvider.cfg: " + ipCSV)
+ linkConfig.close()
+
+ #config null device
+ cellIp = []
+ for node in range(1, clusterCount + 1):
+ cellIp.append(ONOSIp[node])
+ main.log.info(" NullDeviceProvider.cfg: " + str(cellIp))
+ main.ONOSbench.configNullDev(cellIp, switches)
+
+ #devide flows
+ flows = int(main.params[ 'TEST' ][ 'flows' ])
+ main.log.info("Flow Target = " + str(flows))
- switchDistribution = [(switches/int(serversToRun))]*int(serversToRun)
- main.log.info("Switch distribution init: " + str(switchDistribution))
- remainder = switches % int(serversToRun)
- for r in range(0, remainder):
- switchDistribution[r] += 1
- main.log.info("Switch distribution: " + str(switchDistribution))
-
- deviceSettings = ""
- for i in range(0, serversToRun):
- deviceSettings += (ONOSIp[i+1] + ":" + str(switchDistribution[i]))
- if i < int(serversToRun)-1:
- deviceSettings +=","
+ flows = (flows *max(int(n)+1,int(servers)))/((int(n) + 1)*int(servers)*(switches))
- deviceConfig.write("devConfigs = " + deviceSettings)
- main.log.info(" NullDeviceProvider.cfg: " + deviceSettings)
- deviceConfig.close()
+ main.log.info("Flows per switch = " + str(flows))
+ #main.log.info("Total flows = " + str(switches * flows))
- main.log.info("Creating cell file for this step")
- exec "a = main.ONOSbench.createCellFile"
- cellIp = []
- for node in range (1, serversToRun + 1):
- cellIp.append(ONOSIp[node])
- main.log.info("Cells are: " + str(cellIp) )
- a(BENCHIp,cellName,MN1Ip,str(Features), *cellIp)
- main.step( "Applying cell file to environment for this step" )
- cellApplyResult = main.ONOSbench.setCell( cellName )
- main.step( "verify cells for this step" )
- verifyCellResult = main.ONOSbench.verifyCell()
+ #build list of servers in "$OC1, $OC2...." format
+ serverEnvVars = ""
+ for i in range (1,int(servers)+1):
+ serverEnvVars += ("-s " + ONOSIp[i] + " ")
+
+ data = [[""]*int(servers)]*int(sampleSize)
+ maxes = [""]*int(sampleSize)
+
+ for test in range(0, (warmUp + sampleSize)):
+ flowCMD = "python3 " + homeDir + "/onos/tools/test/bin/"
+ flowCMD += testCMD[0] + " " + str(flows) + " " + testCMD[1]
+ flowCMD += " " + str(n) + " " + str(serverEnvVars)
+ print("\n")
+ main.log.info("COMMAND: " + flowCMD)
+ main.log.info("Executing command")
- #devide flows
- flows = int(main.params[ 'TEST' ][ 'flows' ])
- main.log.info("Flow Target = " + str(flows))
-
- flows = (flows *max(int(n)+1,int(servers)))/((int(n) + 1)*int(servers)*(switches))
-
- main.log.info("Flows per switch = " + str(flows))
- #main.log.info("Total flows = " + str(switches * flows))
-
-
- #kill off all onos processes
- main.log.step("Safety check, killing all ONOS processes")
- for node in range(1, int(maxNodes) + 1):
- main.ONOSbench.onosDie(ONOSIp[node])
-
- #Uninstall everywhere
- main.log.step( "Cleaning Enviornment..." )
- for i in range(1, int(maxNodes) + 1):
- main.log.info(" Uninstalling ONOS " + str(i) )
- main.ONOSbench.onosUninstall( ONOSIp[i] )
-
- #package
- main.log.step( "Repackaging onos to reflect config file changes" )
- main.ONOSbench.onosPackage()
-
- # install on relevant nodes
- startNodes = max(int(n), serversToRun)
- main.log.step( "Reinstalling ONOS on relevant nodes (1-" + str(startNodes) + ")" )
- for s in range(1, startNodes + 1):
- main.ONOSbench.onosInstall( node=ONOSIp[s])
- exec "a = main.ONOS%scli.startOnosCli" %str(s)
- a(ONOSIp[s])
-
- main.log.info("sleeping 30 second waiting for null provider bundle...")
- time.sleep(30)
-
- #build list of servers in "$OC1, $OC2...." format
- serverEnvVars = ""
- for i in range (1,int(servers)+1):
- serverEnvVars += ("-s " + ONOSIp[i] + " ")
-
- data = [[""]*int(servers)]*int(sampleSize)
- maxes = [""]*int(sampleSize)
-
- for test in range(0, (warmUp + sampleSize)):
- flowCMD = "python3 " + homeDir + "/onos/tools/test/bin/"
- flowCMD += testCMD[0] + " " + str(flows) + " " + testCMD[1]
- flowCMD += " " + str(n) + " " + str(serverEnvVars)
- print("\n")
- main.log.info("COMMAND: " + flowCMD)
- main.log.info("Executing command")
+ for i in range(0,15):
main.ONOSbench.handle.sendline(flowCMD)
- result = []
- for s in range(0, int(servers)):
- result.append("q")
-
- for s in range(0, int(servers)):
- main.ONOSbench.handle.expect("ms")
- rawResult = ((main.ONOSbench.handle.before).splitlines())
+ time.sleep(1)
+ main.ONOSbench.handle.expect(":~")
+ rawResult = main.ONOSbench.handle.before
+ if " -> " in rawResult:
+ break
- rawResult = ((rawResult.pop()).split(" "))
- main.log.info("Debug: rawResult: " + str(rawResult))
+ result = [""]*(clusterCount)
+ rawResult = rawResult.splitlines()
+ print(rawResult)
+ for node in range(1, clusterCount + 1):
+ for line in rawResult
+ if ONOSIp[node] in line and " -> " in line:
+ myLine = line.split(" ")
+ for word in myLine:
+ if "ms" in word:
+ result[node-1] = int(word.replace("ms",""))
+ main.log.info("Parsed result: " + str(result[node-1]))
+ break
+ break
- myresult = int(rawResult[2])
- main.log.info("Result: " + str(myresult))
-
- myIp = rawResult[0]
- main.log.info("myIp: " + myIp)
+ if test >= warmUp:
+ for i in result:
+ if i == "":
+ main.log.error("Missing data point, critical failure incoming")
- serverIndex = int(ONOSIp.index(myIp))
- main.log.info("server index = " + str(serverIndex))
-
- result[serverIndex - 1] = myresult
-
- if test >= warmUp:
- maxes[test-warmUp] = max(result)
- main.log.info("Data collection iteration: " + str(test-warmUp) + " of " + str(sampleSize))
- main.log.info("Throughput time: " + str(maxes[test-warmUp]) + "(ms)")
+ print result
+ maxes[test-warmUp] = max(result)
+ main.log.info("Data collection iteration: " + str(test-warmUp) + " of " + str(sampleSize))
+ main.log.info("Throughput time: " + str(maxes[test-warmUp]) + "(ms)")
- if test >= warmUp:
- data[test-warmUp] = result
+ if test >= warmUp:
+ data[test-warmUp] = result
- # wait for flows = 0
- removedFlows = False
- repeat = 0
- time.sleep(3)
- while removedFlows == False & repeat <= 10:
- main.ONOSbench.handle.sendline("onos $OC1 summary| cut -d ' ' -f6")
- main.ONOSbench.handle.expect("~")
- before = main.ONOSbench.handle.before
- parseTest = before.splitlines()
- flowsummary = ""
- for line in parseTest:
- if "flow" in str(line):
- flowsummary = line
- break
- currentflow = ""
- for word in flowsummary.split(" "):
- if "flow" in str(word):
- currentflow = str(word)
- currentflow = currentflow.replace(",","")
- currentflow = currentflow.replace("\n","")
- main.log.info(currentflow)
+ # wait for flows = 0
+ removedFlows = False
+ repeat = 0
+ time.sleep(3)
+ while ( removedFlows == False and repeat <= 10 ):
+ main.ONOSbench.handle.sendline("onos $OC1 summary| cut -d ' ' -f6")
+ main.ONOSbench.handle.expect("~")
+ before = main.ONOSbench.handle.before
+ parseTest = before.splitlines()
+ flowsummary = ""
+ for line in parseTest:
+ if "flow" in str(line):
+ flowsummary = line
+ break
+ currentflow = ""
+ for word in flowsummary.split(" "):
+ if "flow" in str(word):
+ currentflow = str(word)
+ currentflow = currentflow.replace(",","")
+ currentflow = currentflow.replace("\n","")
+ #main.log.info(currentflow)
- zeroFlow = "flows=0"
- if zeroFlow in before:
- removedFlows = True
- main.log.info("\t Wait 5 sec of cool down...")
- time.sleep(5)
-
+ zeroFlow = "flows=0"
+ if zeroFlow in before:
+ removedFlows = True
+ main.log.info("\t Wait 5 sec of cool down...")
time.sleep(5)
- repeat +=1
-
- main.log.info("raw data: " + str(data))
- main.log.info("maxes:" + str(maxes))
-
- # report data
- print("")
- main.log.info("\t Results (measurments are in milliseconds)")
- print("")
+ time.sleep(5)
+ repeat +=1
+
+ main.log.info("raw data: " + str(data))
+ main.log.info("maxes:" + str(maxes))
- nodeString = ""
- for i in range(1, int(servers) + 1):
- nodeString += ("\tNode " + str(i))
-
- for test in range(0, sampleSize ):
- main.log.info("\t Test iteration " + str(test + 1) )
- main.log.info("\t------------------")
- main.log.info(nodeString)
- resultString = ""
+
+ # report data
+ print("")
+ main.log.info("\t Results (measurments are in milliseconds)")
+ print("")
- for i in range(0, int(servers) ):
- resultString += ("\t" + str(data[test][i]) )
- main.log.info(resultString)
+ nodeString = ""
+ for i in range(1, int(servers) + 1):
+ nodeString += ("\tNode " + str(i))
+
+ for test in range(0, sampleSize ):
+ main.log.info("\t Test iteration " + str(test + 1) )
+ main.log.info("\t------------------")
+ main.log.info(nodeString)
+ resultString = ""
- print("\n")
+ for i in range(0, int(servers) ):
+ resultString += ("\t" + str(data[test][i]) )
+ main.log.info(resultString)
- avgOfMaxes = numpy.mean(maxes)
- main.log.info("Average of max value from each test iteration: " + str(avgOfMaxes))
+ print("\n")
- stdOfMaxes = numpy.std(maxes)
- main.log.info("Standard Deviation of max values: " + str(stdOfMaxes))
- print("\n\n")
+ avgOfMaxes = numpy.mean(maxes)
+ main.log.info("Average of max value from each test iteration: " + str(avgOfMaxes))
- avgTP = int(main.params[ 'TEST' ][ 'flows' ]) / avgOfMaxes #result in kflows/second
-
- tp = []
- for i in maxes:
- tp.append((int(main.params[ 'TEST' ][ 'flows' ]) / i ))
+ stdOfMaxes = numpy.std(maxes)
+ main.log.info("Standard Deviation of max values: " + str(stdOfMaxes))
+ print("\n\n")
- stdTP = numpy.std(tp)
+ avgTP = int(main.params[ 'TEST' ][ 'flows' ]) / avgOfMaxes #result in kflows/second
+
+ tp = []
+ for i in maxes:
+ tp.append((int(main.params[ 'TEST' ][ 'flows' ]) / i ))
- main.log.info("Average thoughput: " + str(avgTP) + " Kflows/second" )
- main.log.info("Standard deviation of throughput: " + str(stdTP) + " Kflows/second")
+ stdTP = numpy.std(tp)
- resultsLog = open(logFileName,"a")
- resultsLog.write(str(main.params[ 'TEST' ][ 'flows' ]) + "," + n + "," + str(servers) + str(switches) + "," + str(warmUp))
- resultsLog.write("," +str(sampleSize) + "," + str(avgTP) + "," + str(stdTP) + "\n")
- resultsLog.close()
-
-
+ main.log.info("Average thoughput: " + str(avgTP) + " Kflows/second" )
+ main.log.info("Standard deviation of throughput: " + str(stdTP) + " Kflows/second")
+
+ resultsLog = open(logFileName,"a")
+ resultsLog.write(str(main.params[ 'TEST' ][ 'flows' ]) + "," + n + "," + str(servers) + str(switches) + "," + str(warmUp))
+ resultsLog.write("," +str(sampleSize) + "," + str(avgTP) + "," + str(stdTP) + "\n")
+ resultsLog.close()
+
+
diff --git a/TestON/tests/flowTP1g/flowTP1g.topo b/TestON/tests/flowTP1g/flowTP1g.topo
index 0e45e0f..30a1467 100644
--- a/TestON/tests/flowTP1g/flowTP1g.topo
+++ b/TestON/tests/flowTP1g/flowTP1g.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.254.1.201</host>
+ <host>10.128.5.51</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.254.1.202</host>
+ <host>10.128.5.52</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.254.1.203</host>
+ <host>10.128.5.53</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.254.1.204</host>
+ <host>10.128.5.54</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.254.1.205</host>
+ <host>10.128.5.65</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.254.1.206</host>
+ <host>10.128.5.66</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.254.1.207</host>
+ <host>10.128.5.67</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>