Sha256: b4bfdaa2106764130f91b398ad9d67d008db8b5b92c0619699ef5a4ffa995f18

Contents?: true

Size: 612 Bytes

Versions: 131

Compression:

Stored size: 612 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'test_helper.rb')
require 'rbbt/util/procpath'

class TestProcPath < Test::Unit::TestCase
  def test_record_and_plot
    Log.with_severity 0 do
      pid = Process.fork do
        a = ""
        (0..1000).each do 
          a << (0..rand(10000).to_i).to_a.collect{|i| "TEST #{i}" } * " "
          sleep 0.1
        end
      end

      TmpFile.with_file(nil, false) do |db|

        ProcPath.record(pid, db, :interval => '1', "recnum" => 100)
        ProcPath.plot(db, db + '.svg', "moving-average-window" => 1 )
      end
    end
  end
end

Version data entries

131 entries across 131 versions & 1 rubygems

Version Path
rbbt-util-5.42.0 test/rbbt/util/test_procpath.rb
rbbt-util-5.41.1 test/rbbt/util/test_procpath.rb
rbbt-util-5.41.0 test/rbbt/util/test_procpath.rb
rbbt-util-5.40.5 test/rbbt/util/test_procpath.rb
rbbt-util-5.40.4 test/rbbt/util/test_procpath.rb
rbbt-util-5.40.3 test/rbbt/util/test_procpath.rb
rbbt-util-5.40.0 test/rbbt/util/test_procpath.rb
rbbt-util-5.39.0 test/rbbt/util/test_procpath.rb
rbbt-util-5.38.1 test/rbbt/util/test_procpath.rb
rbbt-util-5.38.0 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.16 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.15 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.14 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.13 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.12 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.11 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.10 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.9 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.8 test/rbbt/util/test_procpath.rb
rbbt-util-5.37.6 test/rbbt/util/test_procpath.rb