Ruby Benchmark Script: Difference between revisions
From Federal Burro of Information
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
</pre> | </pre> | ||
[[Category: | [[Category:Script]] |
Revision as of 14:14, 10 July 2020
The benchmark script looks like this:
1 require "net/http" 2 require "uri" 3 4 while true do 5 threads = [] 6 7 5.times do 8 threads << Thread.new do 9 Net::HTTP.get_response(URI.parse("http://172.17.8.102")) 10 end 11 end 12 13 threads.join 14 15 sleep rand(2) 16 end