LlaDash Speed API ドキュメント

Node Speed APIは、ユーザーのネットワーク環境(ダウンロード帯域幅、レイテンシ)を計測するためのCORS完全対応エンドポイントです。

ダウンロード帯域幅計測

計測用に約150MBのダミーデータをストリーミング配信します。正確なスループットを計測するために、ブラウザのキャッシュを無効にしてリクエストしてください。

GET /api/download

Example Request

// Fetch dummy data to measure throughput
const startTime = performance.now();
await fetch('https://speed.ndnx.workers.dev/api/download', {
  cache: 'no-store'
});
const duration = performance.now() - startTime;
console.log('Download took ' + duration + ' ms');

レイテンシ(Ping)計測

レイテンシを計測するための超軽量なエンドポイントです。'pong' という文字列を即座に返します。

GET /api/ping

Example Request

// Quick latency check
const start = performance.now();
const res = await fetch('https://speed.ndnx.workers.dev/api/ping');
const text = await res.text();
console.log('Response: ' + text + ' | Latency: ' + (performance.now() - start) + ' ms');