360 Secure SkillHub
360 安全技能中心

Network Speed Test

通过纯 Python 标准库脚本调用 Cloudflare 测速端点与公共 DNS,测量下载速度、上传速度以及多主机延迟和抖动;可单项或全部运行,并输出人类可读文本或结构化 JSON,无需 API 密钥。

johnnywang2001
johnnywang2001
热度 81.20
最近更新 2026-05-11 17:33:53
分类:自动化依赖:代码执行 / 第三方 API应用场景:数据处理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add network-speed-test
Metadata
name
network-speed-test
description
Measure network download speed, upload speed, and latency from the command line. Uses Cloudflare speed test endpoints and public DNS for latency measurements. No external dependencies — pure Python with stdlib only. Use when checking internet speed, diagnosing slow connections, measuring latency/jitter, or benchmarking network performance.

Network Speed Test

Measure download, upload, and latency with zero dependencies.

Commands

All commands use scripts/speed_test.py.

Run All Tests

python3 scripts/speed_test.py --all
python3 scripts/speed_test.py --all --json

Individual Tests

python3 scripts/speed_test.py --download
python3 scripts/speed_test.py --upload
python3 scripts/speed_test.py --latency

Custom Test Size

python3 scripts/speed_test.py --download --size 25   # 25 MB download test
python3 scripts/speed_test.py --all --size 50         # 50 MB download, 25 MB upload

JSON Output

python3 scripts/speed_test.py --all --json

Returns structured JSON with timestamp, latency stats (avg/min/max/jitter per host), download speed (Mbps), and upload speed (Mbps).

Latency Targets

Tests TCP connection latency to Cloudflare DNS (1.1.1.1), Google DNS (8.8.8.8), and Quad9 (9.9.9.9). Reports average, min, max, and jitter for each.

Notes

  • Download uses Cloudflare speed test endpoint
  • Upload uses Cloudflare speed test endpoint
  • Default test size: 10 MB download, 5 MB upload
  • No API keys or accounts required