Sha256: 2b09c9a6dd9e105c2aa40d89f516782c74d0662c9fbfbc09d3e1ecaf8357c47c

Contents?: true

Size: 525 Bytes

Versions: 10

Compression:

Stored size: 525 Bytes

Contents

require 'test_helper'
require 'fast_stack'
require 'flamegraph/fast_stack_sampler'

class TestFastStackSampler < Minitest::Test

  def test_sample_collection
    samples = Flamegraph::FastStackSampler.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::FastStackSampler.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_fast_stack_sampler.rb
flamegraph-0.1.0 test/test_fast_stack_sampler.rb
flamegraph-0.0.9 test/test_fast_stack_sampler.rb
flamegraph-0.0.8 test/test_fast_stack_sampler.rb
flamegraph-0.0.7 test/test_fast_stack_sampler.rb
flamegraph-0.0.6 test/test_fast_stack_sampler.rb
flamegraph-0.0.5 test/test_fast_stack_sampler.rb
flamegraph-0.0.4 test/test_fast_stack_sampler.rb
flamegraph-0.0.3 test/test_fast_stack_sampler.rb
flamegraph-0.0.2 test/test_fast_stack_sampler.rb