Update: Added DB value for column DataPath.
This commit is contained in:
Родитель
5e05a8d6dd
Коммит
bae51a19ca
|
@ -167,15 +167,22 @@ collect_VM_properties
|
||||||
$KernelVersion = cat "$LogDir\VM_properties.csv" | Select-String "Kernel version"| %{$_ -replace ",Kernel version,",""}
|
$KernelVersion = cat "$LogDir\VM_properties.csv" | Select-String "Kernel version"| %{$_ -replace ",Kernel version,",""}
|
||||||
$IPVersion = "IPv4"
|
$IPVersion = "IPv4"
|
||||||
$ProtocolType = "TCP"
|
$ProtocolType = "TCP"
|
||||||
|
if($EnableAcceleratedNetworking)
|
||||||
|
{
|
||||||
|
$DataPath = "SRIOV"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$DataPath = "Synthetic"
|
||||||
|
}
|
||||||
$connectionString = "Server=$dataSource;uid=$user; pwd=$password;Database=$database;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;"
|
$connectionString = "Server=$dataSource;uid=$user; pwd=$password;Database=$database;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;"
|
||||||
$LogContents = Get-Content -Path "$LogDir\report.log"
|
$LogContents = Get-Content -Path "$LogDir\report.log"
|
||||||
$SQLQuery = "INSERT INTO $dataTableName (TestCaseName,TestDate,HostType,HostBy,HostOS,GuestOSType,GuestDistro,GuestSize,KernelVersion,IPVersion,ProtocolType,NumberOfConnections,Throughput_Gbps,Latency_ms) VALUES "
|
$SQLQuery = "INSERT INTO $dataTableName (TestCaseName,TestDate,HostType,HostBy,HostOS,GuestOSType,GuestDistro,GuestSize,KernelVersion,IPVersion,ProtocolType,DataPath,NumberOfConnections,Throughput_Gbps,Latency_ms) VALUES "
|
||||||
|
|
||||||
for($i = 1; $i -lt $LogContents.Count; $i++)
|
for($i = 1; $i -lt $LogContents.Count; $i++)
|
||||||
{
|
{
|
||||||
$Line = $LogContents[$i].Trim() -split '\s+'
|
$Line = $LogContents[$i].Trim() -split '\s+'
|
||||||
$SQLQuery += "('$TestCaseName','$(Get-Date -Format yyyy-MM-dd)','$HostType','$HostBy','$HostOS','$GuestOSType','$GuestDistro','$GuestSize','$KernelVersion','$IPVersion','$ProtocolType',$($Line[0]),$($Line[1]),$($Line[2])),"
|
$SQLQuery += "('$TestCaseName','$(Get-Date -Format yyyy-MM-dd)','$HostType','$HostBy','$HostOS','$GuestOSType','$GuestDistro','$GuestSize','$KernelVersion','$IPVersion','$ProtocolType','$DataPath',$($Line[0]),$($Line[1]),$($Line[2])),"
|
||||||
}
|
}
|
||||||
$SQLQuery = $SQLQuery.TrimEnd(',')
|
$SQLQuery = $SQLQuery.TrimEnd(',')
|
||||||
LogMsg $SQLQuery
|
LogMsg $SQLQuery
|
||||||
|
|
Загрузка…
Ссылка в новой задаче