Sha256: d8eaa396e980b4d7c513c4023aad6518fd7776b73db8ab28cc58897a2e28ab7f

Contents?: true

Size: 467 Bytes

Versions: 10

Compression:

Stored size: 467 Bytes

Contents

require 'test_helper'
require 'flamegraph/sampler'

class TestSampler < Minitest::Test

  def test_sample_collection
    samples = Flamegraph::Sampler.collect do
      sleep 0.005
    end

    assert(samples.count > 3, "Should get more than 3 samples in 5 millisecs")
  end

  def test_fidelity
    samples = Flamegraph::Sampler.collect(10) do
      sleep 0.005
    end

    assert(samples.count <= 1, "Should get a max of 1 sample got #{samples.count}")
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flamegraph-0.9.5 test/test_sampler.rb
flamegraph-0.1.0 test/test_sampler.rb
flamegraph-0.0.9 test/test_sampler.rb
flamegraph-0.0.8 test/test_sampler.rb
flamegraph-0.0.7 test/test_sampler.rb
flamegraph-0.0.6 test/test_sampler.rb
flamegraph-0.0.5 test/test_sampler.rb
flamegraph-0.0.4 test/test_sampler.rb
flamegraph-0.0.3 test/test_sampler.rb
flamegraph-0.0.2 test/test_sampler.rb