Profiling Ruby Code

To really drill into your code try out stackprof. Here’s a quick solution on how to use it: Install the gem: gem install stackprof. In your code add: require ‘stackprof’ and surround the part that you want to check with this: StackProf.run(mode: :cpu, out: ‘stackprof-output.dump’) do {YOUR_CODE} end After running your ruby script go check … Read more

Understanding ruby-prof output

Each section of the ruby-prof output is broken up into the examination of a particular function. for instance, look at the first section of your output. The read_frames method on FrameParser is the focus and it is basically saying the following: 100% of the execution time that was profiled was spent inside of FrameParser#read_frames FrameParser#read_frames … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)