Created
February 23, 2015 11:41
-
-
Save youyo/5f2e1c21a3149e9a4328 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'gruff' | |
| require 'json' | |
| require 'yajl' | |
| require 'pp' | |
| giops = Gruff::Line.new | |
| giops.title = "IOPS Result (bs=4k)" | |
| giops.x_axis_label = 'IO depth' | |
| giops.y_axis_label = 'IOPS' | |
| giops.labels = {0 => '1', 1 => '2', 2 => '4', 3 => '8', 4 => '16', 5 => '32', 6 => '64'} | |
| gbw = Gruff::Line.new | |
| gbw.title = "BandWidth Result (bs=4k)" | |
| gbw.x_axis_label = 'IO depth' | |
| gbw.y_axis_label = 'BW KB/s' | |
| gbw.labels = {0 => '1', 1 => '2', 2 => '4', 3 => '8', 4 => '16', 5 => '32', 6 => '64'} | |
| Yajl::Parser.new.parse(STDIN) do |json| | |
| giops.data(json["rwtype"], json["iops"]) | |
| gbw.data(json["rwtype"], json["bw"]) | |
| end | |
| giops.write('./tmp/fio_result_iops.png') | |
| gbw.write('./tmp/fio_result_bw.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment