14
6

More than 5 years have passed since last update.

入力値のパーセンタイル値を出力する percentile 作った

Last updated at Posted at 2015-08-17

numstat に続く、アドホックなベンチマークを手助けする percentile というコマンドを紹介します。

インストール

Go をインストール済みであれば go get するだけです。

$ go get github.com/yuya-takeyama/percentile

もしくは GitHub Releases のページから適切なものをダウンロードしてください。

使い方

ここでは 1 未満の数値を 100000 個与えてそのパーセンタイル値を出力しています。

$ seq 100000 | awk '{ print rand() }' | percentile
50%:    0.499571
66%:    0.659243
75%:    0.749378
80%:    0.800353
90%:    0.90013
95%:    0.950081
98%:    0.980481
99%:    0.99058
100%:   0.999994

結構便利だと思うのでよければ使ってみてください。

14
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
6