I want compare time of execution Post.all and SELECT * FROM posts (or some other statements) How can i get execution time of Post.all ?
I want compare time of execution Post.all and SELECT * FROM posts (or some other statements) How can i get execution time of Post.all ?
Here is my version of how to measure performance automatically in rails console using gem: https://github.com/igorkasyanchuk/execution_time
It's showing similar information which you already see during requests.
Sample:
[METRICS] Completed in 908.3ms | Allocations: 2894 | ActiveRecord: 0.9ms (queries: 13)