Job 1788337123077

Command: powershell -NoProfile -Command "$ErrorActionPreference='SilentlyContinue'; $ptr=Get-Content -LiteralPath 'G:\My Drive\ChatGPTBridge\current_bridge.txt' -Raw; $direct=([regex]::Match($ptr,'URL=(.+)')).Groups[1].Value.Trim(); $proc=Get-CimInstance Win32_Process | Where-Object { $_.CommandLine -match 'sheet_relay.py' } | Select-Object -First 1; $key=''; if($proc -and $proc.CommandLine -match '(?:--key|relay[_-]?key)[ =\"'']+([^ \"'']+)'){ $key=$matches[1] }; $master='https://script.google.com/macros/s/AKfycbzfc8XAvNwuNUOxzhDXi3OjoxHxwcYC7niSRAglE7XerTSBnTI0jbblFS2HG8UwHWxksw/exec'; function Bench($name,$url){$a=@();$ok=0;1..10|%{$sw=[Diagnostics.Stopwatch]::StartNew();try{$r=Invoke-WebRequest -UseBasicParsing -Uri $url -TimeoutSec 5;$sw.Stop();$a+=$sw.Elapsed.TotalMilliseconds;if($r.StatusCode -eq 200){$ok++}}catch{$sw.Stop();$a+=$sw.Elapsed.TotalMilliseconds}};$s=$a|Sort-Object;$p50=$s[[int][math]::Floor(($s.Count-1)*0.5)];$p95=$s[[int][math]::Floor(($s.Count-1)*0.95)];[pscustomobject]@{route=$name;n=$a.Count;ok=$ok;p50_ms=[math]::Round($p50,1);p95_ms=[math]::Round($p95,1);min_ms=[math]::Round(($s|Select-Object -First 1),1);max_ms=[math]::Round(($s|Select-Object -Last 1),1)}}; $out=@(); if($direct){$out+=Bench 'direct_current' $direct}; if($key){$q='?action=status&target=pc&relay_key='+[uri]::EscapeDataString($key);$out+=Bench 'master_webapp' ($master+$q)} else {$out += [pscustomobject]@{route='master_webapp';n=0;ok=0;note='relay_key_not_found_in_process'}}; $out|ConvertTo-Json -Compress"
Directory: projects
Status: SUCCESS
Exit code: 0

Cancel Job Rerun Command Refresh

[{"route":"direct_current","n":10,"ok":10,"p50_ms":243.1,"p95_ms":346.4,"min_ms":170.2,"max_ms":916.5},{"route":"master_webapp","n":10,"ok":0,"p50_ms":743.8,"p95_ms":1132.3,"min_ms":657.7,"max_ms":1281.7}]