These are chat archives for ManageIQ/manageiq/performance

Dec 2018
Nick LaMuro
Dec 05 2018 22:15

This was something that I noticed myself when working with webrick locally:

I was noticing it when I was hopping on "home" versus "coffeeshop" wifi, and even when just shutting off my wifi at home:
$ time ruby -r webrick -e ""

real    0m0.166s
user    0m0.124s
sys     0m0.038s

# turns off wifi...
$ time ruby -r webrick -e ""

real    0m5.498s
user    0m0.152s
sys     0m0.106s
anyway, thought it was kinda interesting, and something I would share. Fixed it with a minor monkey patch for personal use to I load early in the pipeline:
require 'webrick/utils'

module WEBrick::Utils
  def getservername
  module_function :getservername