When is criterion stable between runs, how can it be made more so?

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
haskell
領域
performance

調査の方向性

まず、同じ単純なマイクロベンチマーク、-L20 を使った長時間実行の反復、および高い --iters を指定した個別の実行で、報告された変動を再現します。測定結果と回帰データを比較し、特に X 軸の点の選択と、R^2 が低いケースを確認します。連続する実行結果がなぜ 10% を超えて変動するのかを特定し、Krun の冷却ステップなど、関連するマシン状態の制御を含む、安定性を改善するための検証済みの方法を定義できれば完了です。

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

説明

Question

Criterion gives highly precise measurements. Given two measurements of a simple microbenchmark A, A1,A2, if:

  • both were taking starting from a similar machine state,
  • both report very high R^2 values, and
  • both were run for a long -L20 or higher,

then A1/A2 should be close estimates, right? No, unfortunately.

When measuring 1279 benchmarks on Stackage, we have found that it's very common to have greater than 10% variation between consecutive runs of the same, small, deterministic benchmark.

Anecdotally, we seem to get more stable numbers from individual high --iters runs, than from linear regression. I don't have a good explanation yet. Perhaps the non-determinism in the selection of data points (on the X axis) is having more of an effect than we expected? Certainly, when there is a bad R^2, we've seen exactly where it starts running has a big effect.

@RyanGlScott and @vollmerm have been working on this.

(On a related note, it would be great to have some assistance when using criterion with the kinds of things Krun controls, like waiting for the machine to cool down to a baseline temperature before starting a run.)

主要言語
Haskell
スター
525
フォーク
88
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

haskell/criterion のほかの issue

haskell/criterion の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

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

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