やってくれることは、以下の3つです。
- ベンチマーク結果を保存
- ベンチマーク測定に使用したコマンドを保存し、再実行
- ベンチマーク結果をグラフにして表示
以下、使用イメージ。
たとえば、qrintfのベンチマークを取ることを考えてみると、examples/ipv4addr.cをコンパイルして実行し、time(1)の値を記録したい。
$ bin/qrintf gcc -O2 examples/ipv4addr.c && time ./a.out 1234567890 result: 73.150.2.210 real 0m0.176s user 0m0.170s sys 0m0.003sこんな感じ。
このコマンドをbenchartに引数として渡してやると、コマンドを実行し、その結果をbenchart.xmlというファイルに保存してくれる。sh -c をつけてるのは、その引数をサブシェルでハンドリングするためだし、timeに-pオプションをつけてるのは、空白区切の単位なしの出力にするため。
benchart record -- sh -c 'bin/qrintf gcc -O2 examples/ipv4addr.c && /usr/bin/time -p ./a.out 1234567890 2>&1' Following scores were recorded under name: 283a25e. real: 0.17 user: 0.17 sys: 0.00 If the results look unapropriate, run `/usr/local/bin/benchart pop` to pop the result.
で、次に
v0.9.2
でもベンチマークを記録したいので、git checkout
して、今度は引数なしでbenchart record
を実行すると、前回と同じコマンドを実行して、ベンチマークをとってくれる。$ git checkout v0.9.2 $ benchart record Following scores were recorded under name: v0.9.2. real: 0.17 user: 0.17 sys: 0.00 If the results look unapropriate, run `/usr/local/bin/benchart pop` to pop the result.
更に前のバージョンをチェックアウトしてベンチマークを取ろうとすると、エラーが出た。
$ git checkout v0.9.1 $ benchart record re-running benchmark command: sh -c bin/qrintf gcc -O2 examples/ipv4addr.c && /usr/bin/time -p ./a.out 1234567890 2>&1 sh: bin/qrintf: No such file or directory benchmark script failed with exit status:32512
「そうだ、コマンド名が変わったんだった!」
というわけで、旧形式のコマンドを指定して再実行。
$ benchart record -- sh -c 'bin/qrintf-gcc -O2 examples/ipv4addr.c && /usr/bin/time -p ./a.out 1234567890 2>&1' Following scores were recorded under name: v0.9.1. real: 0.21 user: 0.20 sys: 0.00 If the results look unapropriate, run `/usr/local/bin/benchart pop` to pop the result.
ついでに、もう1個古いバージョンも記録。
$ git checkout v0.9.0 $ benchart record re-running benchmark command: sh -c bin/qrintf-gcc -O2 examples/ipv4addr.c && /usr/bin/time -p ./a.out 1234567890 2>&1 Following scores were recorded under name: v0.9.0. real: 0.20 user: 0.19 sys: 0.00 If the results look unapropriate, run `/usr/local/bin/benchart pop` to pop the result.
で、測定結果をグラフ表示するには、
benchart show
コマンドを実行。$ benchart showすると、ウェブブラウザでこんな感じでチャートが表示されます。
ベンチマークを記録するのに使ったコマンドは
benchart list-commands
で一覧表示することができ、benchart record --reuse=name
コマンドで、任意の測定コマンドを再実行可能。自分用にでっちあげたものだけど、これでベンチマークを取る苦痛が減ったらいいなと思ってる。
I like this a lot. Thank you for sharing. I'm always looking for upcycles like this. In the end, you don't know it was a shipping pallet to begin with!
ReplyDeleteT20 cricket world cup 2016 Groups List
ICC World Cup 2016 WC Live
This is great do you have a catologue if so I would love one to share with friends and family.
ReplyDeleteRising Pune Supergiants Team Squad Captain Name
GL Players List
Royal Challengers Bangalore Jersey logo Images
This is one of the cult game now, a lot of people enjoy playing them . Also you can refer to the game :
ReplyDeleteanimal jam 2 | five nights at freddys 2 | hotmail login
نقل العفش بالرياض
ReplyDeleteنقل عفش بالدمام
شركات نقل اثاث بالدمام
شركة نقل اثاث بالخبر
شركة نقل عفش بجدة
شركة نقل عفش بخميس مشيط
ReplyDeleteشركة نقل عفش بجازان
شركة نقل عفش بنجران
http://khairyayman.eklablog.com/http-emc-mee-com-transfer-furniture-almadina-almonawara-html-a126376958 شركة نقل عفش بالمدينة المنورة
ReplyDeletehttp://khairyayman.eklablog.com/http-emc-mee-com-transfer-furniture-jeddah-html-a126377054 شركة نقل عفش بجدة
http://khairyayman.eklablog.com/http-emc-mee-com-movers-in-riyadh-company-html-a126376966 شركة نقل عفش بالرياض
http://khairyayman.eklablog.com/http-www-east-eldmam-com-a126377148 شركة نقل عفش بالدمام
https://forums.ipa.edu.sa/vb4/member.php?202-%D9%85%D8%AD%D9%85%D8%AF-%D8%AE%D9%8A%D8%B1%D9%8A
Tu Aashiqui is back again with new episode for the viewers so watch each episode with thrill again. The review of this drama serial is good. and the strory line is much intersting and unique and from the start. No Single scene of this drama is boring. Tu Aashiqui All episode
ReplyDeleteWebroot.com/safe is a protection software solution that communicates with the cloud avoiding the hassle to manage the signature updates to deploy. for office setup visit office.com/setup
ReplyDeleteInteresting post
ReplyDeletebasketball sports
iptv athletics