Restructured log folders according to new updated request.

This commit is contained in:
Shital Savekar 2016-06-21 07:10:36 +05:30
Родитель 12e03a846e
Коммит 9291a46ee9
3 изменённых файлов: 37 добавлений и 21 удалений

Просмотреть файл

@ -88,7 +88,7 @@ if ($isDeployed)
$ntttcpLogFiles = Get-ChildItem -Path $LogDir | Select Name | where {( $_ -imatch "ntttcp-client-logs-test#") -and ( $_ -imatch ".txt")}
foreach ( $file in $ntttcpLogFiles )
{
LogMsg "$($file.Name) downloaded."
LogMsg "$($file.Name) downloaded and analysed for throughput."
$ntttcpConnResult = Get-Content -Path "$LogDir\$($file.Name)" | where { $_ -imatch "throughput :"}
$metadata = "Connections=" + $($file.Name).Replace(".txt","").Split("-")[5]
if ( $ntttcpConnResult )
@ -104,13 +104,24 @@ if ($isDeployed)
$ntttcpLogFiles = Get-ChildItem -Path $LogDir | Select Name | where {( $_ -imatch "ntttcp-server") -or ( $_ -imatch "ntttcp-client")}
foreach ( $file in $ntttcpLogFiles )
{
$fileName = $($file.Name)
$connFolder = $fileName.Split("-")[$fileName.Split("-").count-1].Split(".")[0]
mkdir -Path "$LogDir\$connFolder" -Force | Out-Null
Move-Item -Path "$LogDir\$fileName" -Destination "$LogDir\$connFolder"
LogMsg "$fileName downloaded to folder '$connFolder'"
}
$fileName = $file.Name
if ( ( ( $fileName -imatch ".sar.netio.log" ) -and ( $fileName -imatch "-server-" ) ) -or ( ( $fileName -imatch ".iostat.diskio.log" ) -and ( $fileName -imatch "-server-" ) ) -or ( ( $fileName -imatch ".vmstat.memory.cpu.log" ) -and ( $fileName -imatch "-server-" ) ) )
{
$connFolder = $fileName.Split("-")[$fileName.Split("-").Count-1].Split(".")[0]
mkdir "$LogDir\server-ntttcp-logs" -Force | Out-Null
mkdir "$LogDir\server-ntttcp-logs\$connFolder" -Force | Out-Null
Move-Item "$LogDir\$fileName" -Destination "$LogDir\server-ntttcp-logs\$connFolder" -Force
LogMsg "$($file.Name) downloaded and moved to 'server-ntttcp-logs\$connFolder'"
}
if ( ( ( $fileName -imatch ".sar.netio.log" ) -and ( $fileName -imatch "-client-" ) ) -or ( ( $fileName -imatch ".iostat.diskio.log" ) -and ( $fileName -imatch "-client-" ) ) -or ( ( $fileName -imatch ".vmstat.memory.cpu.log" ) -and ( $fileName -imatch "-client-" ) ) )
{
$connFolder = $fileName.Split("-")[$fileName.Split("-").Count-1].Split(".")[0]
mkdir "$LogDir\client-ntttcp-logs" -Force | Out-Null
mkdir "$LogDir\client-ntttcp-logs\$connFolder" -Force | Out-Null
Move-Item "$LogDir\$fileName" -Destination "$LogDir\client-ntttcp-logs\$connFolder" -Force
LogMsg "$($file.Name) downloaded and moved to 'client-ntttcp-logs\$connFolder'"
}
}
#endregion
if ( $finalStatus -imatch "TestFailed")
@ -165,4 +176,4 @@ $result = GetFinalResultHeader -resultarr $resultArr
DoTestCleanUp -result $result -testName $currentTestData.testName -deployedServices $isDeployed -ResourceGroups $isDeployed
#Return the result and summery to the test suite script..
return $result, $resultSummary
return $result, $resultSummary

Просмотреть файл

@ -336,8 +336,6 @@ if ($isDeployed)
$advancedWrite50BasicResult = ($advancedWrite50BasicResultContents | where { $_ -imatch "Maximum Large MBPS" })
if ( $advancedWrite50BasicResult )
{
$resultSummary += CreateResultSummary -testResult $advancedWrite50BasicResult -metaData $testType -checkValues "PASS,FAIL,ABORTED" -testName $currentTestData.testName
$advancedWrite50BasicResult = ($advancedWrite50BasicResultContents | where { $_ -imatch "Maximum Large MBPS" })
$resultSummary += CreateResultSummary -testResult $advancedWrite50BasicResult -metaData $testType -checkValues "PASS,FAIL,ABORTED" -testName $currentTestData.testName
$advancedWrite50BasicResult = ($advancedWrite50BasicResultContents | where { $_ -imatch "Maximum Small IOPS" })
$resultSummary += CreateResultSummary -testResult $advancedWrite50BasicResult -metaData $testType -checkValues "PASS,FAIL,ABORTED" -testName $currentTestData.testName

Просмотреть файл

@ -97,10 +97,6 @@ if ($isDeployed)
$testTypeResult = $null
$clientTxt = Get-Content -Path "$LogDir\$($file.Name)"
$fileName = $file.Name
$connFolder = $fileName.Split("-")[$fileName.Split("-").Count-1].Split(".")[0]
mkdir "$LogDir\$connFolder" -Force | Out-Null
Move-Item "$LogDir\$fileName" -Destination "$LogDir\$connFolder" -Force
LogMsg "$($file.Name) downloaded and moved to '$connFolder'"
foreach ( $line in $clientTxt )
{
@ -139,19 +135,30 @@ if ($isDeployed)
{
$resultSummary += CreateResultSummary -testResult "ERROR: No result matching strings found. Possible Test Error." -metaData $metaData -checkValues "PASS,FAIL,ABORTED" -testName $currentTestData.testName
}
LogMsg "Analysed $($file.Name) for number of requests."
LogMsg "Downloaded and Analysed $($file.Name) for number of requests."
}
$redisLogFiles = Get-ChildItem -Path $LogDir | Select Name | where { ( $_ -imatch "redis-server-pipelines") -or ( $_ -imatch "redis-client-pipelines") }
foreach ( $file in $redisLogFiles )
{
$fileName = $file.Name
$connFolder = $fileName.Split("-")[$fileName.Split("-").Count-1].Split(".")[0]
mkdir "$LogDir\$connFolder" -Force | Out-Null
Move-Item "$LogDir\$fileName" -Destination "$LogDir\$connFolder" -Force
LogMsg "$($file.Name) downloaded and moved to '$connFolder'"
if ( ( ( $fileName -imatch ".sar.netio.log" ) -and ( $fileName -imatch "-server-" ) ) -or ( ( $fileName -imatch ".iostat.diskio.log" ) -and ( $fileName -imatch "-server-" ) ) -or ( ( $fileName -imatch ".vmstat.memory.cpu.log" ) -and ( $fileName -imatch "-server-" ) ) )
{
$connFolder = $fileName.Split("-")[$fileName.Split("-").Count-1].Split(".")[0]
mkdir "$LogDir\server-redis-logs" -Force | Out-Null
mkdir "$LogDir\server-redis-logs\$connFolder" -Force | Out-Null
Move-Item "$LogDir\$fileName" -Destination "$LogDir\server-redis-logs\$connFolder" -Force
LogMsg "$($file.Name) downloaded and moved to 'server-redis-logs\$connFolder'"
}
if ( ( ( $fileName -imatch ".sar.netio.log" ) -and ( $fileName -imatch "-client-" ) ) -or ( ( $fileName -imatch ".iostat.diskio.log" ) -and ( $fileName -imatch "-client-" ) ) -or ( ( $fileName -imatch ".vmstat.memory.cpu.log" ) -and ( $fileName -imatch "-client-" ) ) )
{
$connFolder = $fileName.Split("-")[$fileName.Split("-").Count-1].Split(".")[0]
mkdir "$LogDir\client-redis-logs" -Force | Out-Null
mkdir "$LogDir\client-redis-logs\$connFolder" -Force | Out-Null
Move-Item "$LogDir\$fileName" -Destination "$LogDir\client-redis-logs\$connFolder" -Force
LogMsg "$($file.Name) downloaded and moved to 'client-redis-logs\$connFolder'"
}
}
#endregion
if ( $finalStatus -imatch "TestFailed")