Sha256: 8089fb35d745be0c4e942fc26ba919f4f23ca8dc5c6e4dcaabc94b7664071d7f

Contents?: true

Size: 704 Bytes

Versions: 12

Compression:

Stored size: 704 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

require File.expand_path('../test_helper', __FILE__)
require 'fileutils'
require 'tmpdir'
require_relative 'prime'

# --  Tests ----
class PrinterCallStackTest < TestCase
  def setup
    super
    # WALL_TIME so we can use sleep in our test and get same measurements on linux and windows
    @result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME) do
      run_primes(1000, 5000)
    end
  end

  def test_graph_html_string
    output = ''
    printer = RubyProf::CallStackPrinter.new(@result)
    printer.print(output)

    assert_match(/<!DOCTYPE html>/i, output)
    assert_match(/Object#run_primes/i, output)
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
ruby-prof-1.7.1-x64-mingw-ucrt test/printer_call_stack_test.rb
ruby-prof-1.7.1 test/printer_call_stack_test.rb
ruby-prof-1.7.0-x64-mingw-ucrt test/printer_call_stack_test.rb
ruby-prof-1.7.0 test/printer_call_stack_test.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/ruby-prof-1.6.3/test/printer_call_stack_test.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/ruby-prof-1.6.3/test/printer_call_stack_test.rb
ruby-prof-1.6.3-x64-mingw-ucrt test/printer_call_stack_test.rb
ruby-prof-1.6.3 test/printer_call_stack_test.rb
ruby-prof-1.6.2-x64-mingw-ucrt test/printer_call_stack_test.rb
ruby-prof-1.6.2 test/printer_call_stack_test.rb
ruby-prof-1.6.1 test/printer_call_stack_test.rb
ruby-prof-1.6.1-x64-mingw-ucrt test/printer_call_stack_test.rb