Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'socket'
- require 'benchmark'
- puts Benchmark.measure { Socket::gethostbyname(Socket::gethostname) }
- # 0.000000 0.000000 0.000000 ( 5.004441)
- # fix, in /etc/hosts: 127.0.0.1 localhost my-host.local
- # OR: enable IPv6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement