I couldn't find any information on if this was possible but it would be useful I could call a method on a command in the rails console and determine the performance using any measurement but I was mostly thinking about in time.
For example, I'm trying to figure out which of these is faster:
[val2,val3,val4,val5,val6].find{|x| x != val1}
[val2,val3,val4,val5,val6].all?{|x| x == val1}
Is there something like this?
[val2,val3,val4,val5,val6].find{|x| x != val1}.performance
There is! And you don't even need Rails. Look into benchmark from the standard library.
As a sample:
The report that is output will show (in seconds):
Something that looks like this: