Sha256: d13325b79ec7f22d1517f27c4a29d04f36595881d98ce85867cceb7afdfc3e33

Contents?: true

Size: 449 Bytes

Versions: 2

Compression:

Stored size: 449 Bytes

Contents

require "pyroscope"

Pyroscope.configure do |config|
  config.app_name = "test.ruby.app"
  config.server_address = "http://pyroscope:4040/"
  config.tags = {
    :region => "us-east-1",
    :hostname => ENV["hostname"]
  }
end

def work(n)
  i = 0
  while i < n
    i += 1
  end
end

def fast_function
  work(20000)
end

def slow_function
  work(80000)
end

Pyroscope.tag({ "region" => "us-east-1" })

while true
  fast_function
  slow_function
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pyroscope-0.2.0 test.rb
pyroscope-0.1.1 test.rb