Created
          December 20, 2016 00:38 
        
      - 
      
- 
        Save mykoweb/abebce476d27002b1b1156a1f8d5724c to your computer and use it in GitHub Desktop. 
Revisions
- 
        mykoweb created this gist Dec 20, 2016 .There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ require 'faraday' require 'benchmark' @conn = Faraday.new(url: 'https://www.google.com') @threads = [] Benchmark.bm(14) do |x| x.report('no-threads') do 8.times { @conn.get } end x.report('with-threads') do 8.times do @threads << Thread.new { @conn.get } end @threads.each(&:join) end end