douyinWEB/scripts/_bench_dy_cn_path.py
eric d409e416da Ship physical dual-edge stack, Studio CDP live metrics, and ops tooling.
Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 22:42:40 -05:00

18 lines
1.1 KiB
Python

#!/usr/bin/env python3
import paramiko, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
c=paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect('107.173.30.245',22,'root','Xiao4669805',timeout=45,allow_agent=False,look_for_keys=False)
_,o,e=c.exec_command(
'echo "=== public ==="; '
'curl -sS -m 15 -o /dev/null -w "api=%{http_code} t=%{time_total}s ttfb=%{time_starttransfer}s\n" https://dy.nomadro.com/api/health; '
'curl -sS -m 15 -o /dev/null -w "neko=%{http_code} t=%{time_total}s ttfb=%{time_starttransfer}s\n" https://dy.nomadro.com/neko/1/; '
'echo "=== wg compare ==="; '
'curl -sS -m 10 -o /dev/null -w "cn_api=%{http_code} t=%{time_total}s\n" http://10.9.0.2:8014/api/health; '
'curl -sS -m 10 -o /dev/null -w "legacy_api=%{http_code} t=%{time_total}s\n" http://10.8.0.2:8014/api/health; '
'curl -sS -m 10 -o /dev/null -w "cn_neko=%{http_code} t=%{time_total}s\n" http://10.9.0.2:9200/; '
'curl -sS -m 10 -o /dev/null -w "legacy_neko=%{http_code} t=%{time_total}s\n" http://10.8.0.2:9200/',
timeout=90)
print((o.read()+e.read()).decode())
c.close()