ssh[i].connect(ServerProfilingInfo[i]["IP address"],username=ServerProfilingInfo[i]["Username"],password=ServerProfilingInfo[i]["Password"])#Connect to the server
ServerProcessName=ServerProfilingInfo[i]["Name"]# Server process names
ServerProcessPath=ServerProfilingInfo[i]["Path"]# Server profiling agent execute file path
ssh[i].connect(ServerProfilingInfo[i]["IP address"],username=ServerProfilingInfo[i]["Username"],password=ServerProfilingInfo[i]["Password"])#Connect to the server
ServerProcessName=ServerProfilingInfo[i]["Name"]# Server process names
ServerProcessPath=ServerProfilingInfo[i]["Path"]# Server profiling agent execute file path
nextServerConfiguration=self.GetNextConfiguration()#Get next server configuration
if(notnextServerConfiguration):
break
status=self.ServerInstance.SetServerConfiguration(nextServerConfiguration,self.apc["Server Configuration"],self.metricsConvergence["serverConfigurationChangeFilePath"])#Set server configuration
(loadLevelTooLow,throughput,responseTime,failureRate,profileData,ServiceDemandProcess,bottleneckServiceDemand)=self.RunOneLoadLevelManual()# start load test at one load level
data=[]
foriinprofileData:# Store the performance and server metrics
(loadLevelTooLow,throughput,responseTime,failureRate,profileData,ServiceDemandProcess,bottleneckServiceDemand)=self.RunOneLoadLevel()#Run one load level
(loadLevelTooLow1,throughput1,responseTime1,failureRate1,profileData1,ServiceDemandProcess1,bottleneckServiceDemand1)=self.RunOneLoadLevel()# Run one load level test
(loadLevelTooLow2,throughput2,responseTime2,failureRate2,profileData2,ServiceDemandProcess2,bottleneckServiceDemand2)=self.RunOneLoadLevel()# Run one load level test
(loadLevelTooLow3,throughput3,responseTime3,failureRate3,profileData3,ServiceDemandProcess3,bottleneckServiceDemand3)=self.RunOneLoadLevel()# Run one load level test
if((throughput3)-(throughput1+throughput2)/2)<self.metricsConvergence["errorThreshold"]:# if the average throughput(max,min) is almost same as throughput(mid) then stop load test
self.RunOptimalInRange(nextServerConfiguration,rangeStart,int((rangeStart+rangeEnd)/2))# at start and mid
mid=self.RunOptimalInRange(nextServerConfiguration,int((rangeStart+rangeEnd)/2),rangeEnd)# at mid and max
return(mid,ServiceDemandProcess3)
#Run one load level
defRunOneLoadLevel(self):
self.backgroundProcessExecTime=self.ServerInstance.IntializeProfilers(self.apc["Server Profiling"],self.apc["MasterConfiguration"])# Capture the server background process resource usage data
if(abs(throughput1-throughput))<ThroughputConvergenceDifference:# if throughput is converged or not, Cummumative difference of the throughput has to fall below a threshold value
count=count+1# This absoulte difference has to be maintained consectively for certain number
"03":"Off the shell load generator not present, need to be installed and check whether it is present by using command 'load-generator-name --version'",
"04":"Load generator session description file not present",
"05":"Load generator name not mentioned in Autoperf configuration file",
"06":"AutoPerf configuration file has error",
"07":"Session description file name not given in configuration file",
"08":"AuthenticationException",
"09":"SSHException",
"10":"Some error during remote connection",
"11":"AutoPerf Development Configuration doesn't exist",