Sha256: f3cdffd6c7c22c37f702e1958a2fff2e6f0a4e58279853d04f2639c51dfe72db
Contents?: true
Size: 792 Bytes
Versions: 1
Compression:
Stored size: 792 Bytes
Contents
# require 'pyroscope' puts "prestart #{Process.pid}" # Pyroscope.configure do |config| # config.app_name = "test.ruby.app{}" # config.server_address = "http://localhost:4040/" # end puts "start" iteration=0 st = Time.new def work(n) i = 0 while i < n i += 1 end end def job_0 work(rand()*1_000_000) end def job_1 work(rand()*2_000_000) end def sleep_job sleep(rand()*10) end while true iteration+=1 r = rand if r < 0.1 sleep_job elsif r < 0.5 puts(" * test.ruby.app{job=0}") # Pyroscope.change_name("test.ruby.app{job=0}") job_0 # Pyroscope.change_name("test.ruby.app{}") else puts(" * test.ruby.app{job=1}") # Pyroscope.change_name("test.ruby.app{job=1}") job_1 # Pyroscope.change_name("test.ruby.app{}") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pyroscope-0.0.13 | test.rb |