File size: 894 Bytes
115a637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3
"""
scripts/speedtest.py — CLI entry point for the Solana RPC/WS + Jupiter
latency diagnostic.

Run directly:
    python scripts/speedtest.py            # full table
    python scripts/speedtest.py --quiet    # one-line summary + exit code
                                            # (usable as a systemd
                                            # ExecStartPre pre-flight gate)

The actual probing logic lives in modules/speedtest.py (run_speedtest()),
shared with the /speedtest Telegram command and the bot API's "speedtest"
action so all three report identical results — this file is just the CLI
shim, since scripts/ isn't a package while modules/ is.
"""

import os
import sys

sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from modules.speedtest import main  # noqa: E402

if __name__ == "__main__":
    sys.exit(main())