test.rb in pyroscope-0.1.0 vs test.rb in pyroscope-0.1.1

- old
+ new

@@ -1,31 +1,31 @@ -require 'pyroscope' +require "pyroscope" -puts "prestart #{Process.pid}" - Pyroscope.configure do |config| - config.app_name = "test.ruby.app{}" - config.server_address = "http://localhost:4040/" + 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 - Pyroscope.tag_wrapper({ "function" => "fast"}) do - work(20_000) - end + work(20000) end def slow_function - Pyroscope.tag({ "function" => "slow"}) - work(80_000) - Pyroscope.remove_tags("function") + work(80000) end + +Pyroscope.tag({ "region" => "us-east-1" }) while true fast_function slow_function end