Last active
August 29, 2015 14:05
-
-
Save zph/a06367ce54822e790fdd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'https://rubygems.org' | |
| gem 'faraday' | |
| gem 'faraday_middleware' | |
| gem 'environs' | |
| gem 'pmap' | |
| gem 'memoist' | |
| gem 'require_all' | |
| gem 'virtus' | |
| gem 'pry-uber' | |
| gem 'stackprof' | |
| # Specify your gem's dependencies in saucer.gemspec | |
| gemspec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'saucer' | |
| require 'stackprof' | |
| Dir.mkdir('tmp') unless Dir.exists?('tmp') | |
| output = 'tmp/stackprof-cpu-myapp.dump' | |
| StackProf.run(mode: :wall, out: output) do | |
| client = Saucer::Client.new | |
| client.jobs(500) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| stackprof tmp/stackprof-cpu-myapp.dump |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| λ 2.1.1 saucer report (●●●)(master) | |
| ================================== | |
| Mode: wall(1000) | |
| Samples: 14846 (37.99% miss rate) | |
| GC: 148 (1.00%) | |
| ================================== | |
| TOTAL (pct) SAMPLES (pct) FRAME | |
| 11546 (77.8%) 11546 (77.8%) block in Enumerable#process_core | |
| 757 (5.1%) 757 (5.1%) block in Net::HTTP#connect | |
| 530 (3.6%) 530 (3.6%) Faraday::Adapter::NetHttp#ssl_cert_store | |
| 236 (1.6%) 236 (1.6%) String#underscore | |
| 104 (0.7%) 102 (0.7%) OpenSSL::Buffering#close | |
| 143 (1.0%) 72 (0.5%) block in OpenSSL::SSL#verify_certificate_identity | |
| 71 (0.5%) 71 (0.5%) block (2 levels) in OpenSSL::SSL#verify_certificate_identity | |
| 60 (0.4%) 60 (0.4%) OpenSSL::Buffering#read_nonblock | |
| 57 (0.4%) 57 (0.4%) OpenSSL::Buffering#do_write | |
| 56 (0.4%) 56 (0.4%) block in Net::HTTP#connect | |
| 54 (0.4%) 54 (0.4%) block in OpenSSL::SSL::SSLContext#set_params | |
| 51 (0.3%) 51 (0.3%) URI::Parser#split | |
| 47 (0.3%) 47 (0.3%) Faraday::Utils::Headers#[]= | |
| 46 (0.3%) 46 (0.3%) JSON#parse | |
| 81 (0.5%) 46 (0.3%) Net::HTTPResponse.each_response_header | |
| 1245 (8.4%) 42 (0.3%) Net::HTTP#connect | |
| 277 (1.9%) 41 (0.3%) block in Saucer::Client#normalize_hash_keys | |
| 38 (0.3%) 38 (0.3%) rescue in Net::BufferedIO#rbuf_fill | |
| 309 (2.1%) 32 (0.2%) Saucer::Client#normalize_hash_keys | |
| 68 (0.5%) 27 (0.2%) URI::Generic#initialize | |
| 64 (0.4%) 24 (0.2%) block in Faraday::Options#update | |
| 27 (0.2%) 24 (0.2%) URI::Generic#find_proxy | |
| 23 (0.2%) 23 (0.2%) Net::BufferedIO#rbuf_consume | |
| 30 (0.2%) 23 (0.2%) OpenSSL::SSL::Nonblock#initialize | |
| 21 (0.1%) 21 (0.1%) Net::HTTPHeader#add_field | |
| 21 (0.1%) 21 (0.1%) Net::HTTP#D | |
| 21 (0.1%) 21 (0.1%) block in Net::HTTP#connect | |
| 20 (0.1%) 20 (0.1%) Net::HTTPHeader#[] | |
| 20 (0.1%) 20 (0.1%) block in Net::HTTPHeader#capitalize | |
| 29 (0.2%) 19 (0.1%) Faraday::Utils::Headers#merge! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment