Created
January 11, 2019 16:51
-
-
Save olegantonyan/fd1b68b85609ab8e3272912a60044184 to your computer and use it in GitHub Desktop.
Revisions
-
olegantonyan created this gist
Jan 11, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ def benchmark(what) start = ::Process.clock_gettime(Process::CLOCK_MONOTONIC) yield finish = ::Process.clock_gettime(Process::CLOCK_MONOTONIC) puts "#{what} took #{finish - start} seconds" end