Sha256: f99c78949e897dd78cd525a38ee856af2adb15f0413db9e8c205baf7f890725b

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

require 'spec_helper'

# TODO: examples for options

describe '[plot] subcommand' do
  before(:each) do
    if ! system("type gnuplot >/dev/null 2>&1")
      skip "gnuplot is not available"
    end
  end

  it 'should create PDFs for busy100.pgr' do
    busy100 = data_file "busy100.pgr"

    cmd = "#{perfmonger_bin} plot #{busy100}"
    run(cmd, 30)
    assert_success(true)
    check_file_presence("iops.pdf")
    check_file_presence("transfer.pdf")
    check_file_presence("cpu.pdf")
    check_file_presence("allcpu.pdf")
  end

  it 'should create PDFs, data and gnuplot files when --save is given' do
    busy100 = data_file "busy100.pgr"

    cmd = "#{perfmonger_bin} plot --save #{busy100}"
    run(cmd, 30)
    assert_success(true)
    check_file_presence("iops.pdf")
    check_file_presence("transfer.pdf")
    check_file_presence("cpu.pdf")
    check_file_presence("allcpu.pdf")

    check_file_presence("io.gp")
    check_file_presence("io.dat")
    check_file_presence("cpu.gp")
    check_file_presence("cpu.dat")
    check_file_presence("allcpu.gp")
    check_file_presence("allcpu.dat")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
perfmonger-0.8.2 spec/plot_spec.rb
perfmonger-0.8.1 spec/plot_spec.rb
perfmonger-0.8.0 spec/plot_spec.rb
perfmonger-0.7.1 spec/plot_spec.rb
perfmonger-0.7.0 spec/plot_spec.rb