Created
September 17, 2018 11:54
-
-
Save syzspectroom/cd399c7cd3f36a285849f914189e1fe5 to your computer and use it in GitHub Desktop.
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 characters
| class Test | |
| include Benchmark | |
| def a | |
| sleep 10 | |
| p 'a' | |
| end | |
| def b | |
| p 'b' | |
| end | |
| benchmark :a | |
| end | |
| p Test.new.a | |
| #=> a | |
| #=> 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment