I have a string long string: its a teamcity buildLog
This is a buildLog from teamcity.
[11:27:30] : [Step 5/5] 15:27:30 INFO: Average times: total 0.455, latency 0.455, connect 0.004
[11:27:30] : [Step 5/5] 15:27:30 INFO: Percentiles:
[11:27:30] : [Step 5/5] +---------------+---------------+
[11:27:30] : [Step 5/5] | Percentile, % | Resp. Time, s |
[11:27:30] : [Step 5/5] +---------------+---------------+
[11:27:30] : [Step 5/5] | 0.0 | 0.021 |
[11:27:30] : [Step 5/5] | 50.0 | 0.103 |
[11:27:30] : [Step 5/5] | 90.0 | 1.166 |
[11:27:30] : [Step 5/5] | 95.0 | 2.27 |
[11:27:30] : [Step 5/5] | 99.0 | 2.77 |
[11:27:30] : [Step 5/5] | 99.9 | 6.996 |
[11:27:30] : [Step 5/5] | 100.0 | 10.312 |
[11:27:30] : [Step 5/5] +---------------+---------------+
[11:27:30] : [Step 5/5] 15:27:30 INFO: Request label stats:
[11:27:30] : [Step 5/5] +------------------------------------------+--------+---------+--------+-------------+
[11:27:30] : [Step 5/5] | label | status | succ | avg_rt | error |
[11:27:30] : [Step 5/5] +------------------------------------------+--------+---------+--------+-------------+
[11:27:30] : [Step 5/5] | Activity History | OK | 100.00% | 1.608 | |
[11:27:30] : [Step 5/5] | Asset Allocation | OK | 100.00% | 0.100 | |
[11:27:30] : [Step 5/5] | Dashboard Cards and Employee Information | OK | 100.00% | 0.255 | |
[11:27:30] : [Step 5/5] | Fund Details | OK | 100.00% | 0.825 | |
[11:27:30] : [Step 5/5] | Investments | OK | 100.00% | 0.132 | |
[11:27:30] : [Step 5/5] | Minimum Version | OK | 100.00% | 0.032 | |
[11:27:30] : [Step 5/5] | Rate of Return | OK | 100.00% | 0.047 | |
[11:27:30] : [Step 5/5] | Retirement Outlook Card | OK | 100.00% | 1.166 | |
[11:27:30] : [Step 5/5] | Retirement Outlook Full | OK | 100.00% | 1.160 | |
[11:27:30] : [Step 5/5] | Savings Rate | OK | 100.00% | 0.112 | |
[11:27:30] : [Step 5/5] | Secure Auth Login | FAIL | 98.58% | 0.207 | Bad Request |
[11:27:30] : [Step 5/5] | Validate Savings Rate Change | OK | 100.00% | 0.127 | |
[11:27:30] : [Step 5/5] | Vested Balance | OK | 100.00% | 0.157 | |
[11:27:30] : [Step 5/5] +------------------------------------------+--------+---------+--------+-------------+
[11:27:35] : [Step 5/5] 15:27:35 INFO: Ending data feeding...
[11:27:36] : [Step 5/5] 15:27:36 INFO: Online report link: https://a.blazemeter.com/app/#/masters/36669958
From above build Log, I have to fetch Percentiles Table
, Request Label Stats
table and Online Report Link
I tried below code but it is returning none:
$firststring = "Percentiles:"
$secondstring = "Request label stats:"
$pattern = "$firststring(.*?)$secondstring"
$result = [regex]::Match($file,$pattern).Groups[1].Value
$result >> returns none
and below code to get the strings.
$Regex = [Regex]::new("(?<=Percentiles:)(.*)(?=Request label stats:)")
$Match = $Regex.Match($status)
if($Match.Success)
{
$Match.Value
}
This also returns none. any help would be really appreciated.