(Question) What does `--latency-correction` do?

オープン
#211 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust
領域
cli, performance

調査の方向性

まず、issue にある 2 つの oha コマンドを再現し、報告された実行時間、リクエストレート、レイテンシーの値をサーバーログと比較します。--latency-correction のエントリーポイントを追跡し、補正後の実行が長く続き、異なるタイミングを報告する理由を特定します。オプションの動作とメトリクスの不一致が説明または修正されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

Test result without --latency-correction:

# ./oha -c 10 -t 5s -z 30s -q 10 --disable-keepalive https://example.com
Summary:
  Success rate: 1.0000
  Total:        30.0055 secs
  Slowest:      2.8308 secs
  Fastest:      0.7532 secs
  Average:      1.9747 secs
  Requests/sec: 5.5323

  Total data:   8.44 MiB
  Size/request: 52.06 KiB
  Size/sec:     288.00 KiB

Response time histogram:
  0.753 [1]  |
  0.961 [2]  |■
  1.169 [1]  |
  1.376 [3]  |■■
  1.584 [7]  |■■■■■
  1.792 [34] |■■■■■■■■■■■■■■■■■■■■■■■■
  2.000 [44] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  2.208 [34] |■■■■■■■■■■■■■■■■■■■■■■■■
  2.415 [23] |■■■■■■■■■■■■■■■■
  2.623 [8]  |■■■■■
  2.831 [9]  |■■■■■■

Latency distribution:
  10% in 1.6346 secs
  25% in 1.7788 secs
  50% in 1.9448 secs
  75% in 2.2062 secs
  90% in 2.4187 secs
  95% in 2.6259 secs
  99% in 2.7707 secs

Details (average, fastest, slowest):
  DNS+dialup:   0.1100 secs, 0.0893 secs, 0.1347 secs
  DNS-lookup:   0.0000 secs, 0.0000 secs, 0.0009 secs

Status code distribution:
  [200] 166 responses

Results looks correct. I've checked server log, and response times are correctly reported.

Test result with --latency-correction as recommended:

# ./oha -c 10 -t 5s -z 30s -q 10 --latency-correction --disable-keepalive https://example.com
Summary:
  Success rate: 1.0000
  Total:        30.0014 secs
  Slowest:      31.7295 secs
  Fastest:      0.6359 secs
  Average:      16.3581 secs
  Requests/sec: 10.0329

  Total data:   15.30 MiB
  Size/request: 52.06 KiB
  Size/sec:     522.29 KiB

Response time histogram:
  0.636 [1]  |
  3.745 [28] |■■■■■■■■■■■■■■■■■■■■■■■■■■
  6.855 [32] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  9.964 [23] |■■■■■■■■■■■■■■■■■■■■■
  13.073 [33] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  16.183 [34] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  19.292 [28] |■■■■■■■■■■■■■■■■■■■■■■■■■■
  22.401 [32] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  25.511 [27] |■■■■■■■■■■■■■■■■■■■■■■■■■
  28.620 [33] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  31.729 [30] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■

Latency distribution:
  10% in 3.8071 secs
  25% in 8.8877 secs
  50% in 16.0519 secs
  75% in 24.4555 secs
  90% in 28.5860 secs
  95% in 29.9808 secs
  99% in 31.3885 secs

Details (average, fastest, slowest):
  DNS+dialup:   14.4690 secs, 0.0922 secs, 29.5267 secs
  DNS-lookup:   14.3596 secs, 0.0019 secs, 29.4168 secs

Status code distribution:
  [200] 301 responses

Test was twice longer than requested (60 s instead of 30 s), "Requests/sec" is incorrect: test lasted 60 s instead of 30 s, made 301 requests (correct), so it is 5 requests per second (confirmed by server logs). And response times are incorrect compared to server logs (response times were are the same as in previous test).

主要言語
Rust
スター
10.7k
フォーク
311
平均マージ
24分
マージ済み PR(30日)
6

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hatoo/oha のほかの issue

hatoo/oha の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。