Top Level Namespace

Defined Under Namespace

Modules: SysBench Classes: DataSet

Instance Method Summary collapse

Instance Method Details

#create_series(key, data, test, x, y) ⇒ Object



77
78
79
80
81
82
83
# File 'lib/sysbench-graph.rb', line 77

def create_series(key, data, test, x, y)
    series = { "label" => key,
               "points" => { "show" => true },
               "lines" => { "show" => true },
               "data"  => data.find_all{ |d| d.send(:test) == test }.map{ |d| [ d.send(x), d.send(y) ] }.sort{ |a,b| a[0].to_i <=> b[0].to_i }
              }
end