Profiling Your Application in Ruby

Profiling Ruby application is done with the help of Profile which you need to include in your application via “include ‘profile” command. Profiler will track all of the executions and method calls and record time it took for each to accomplish its tasks. It will display a detailed report after profiler is finished so that you can examine it for slow running processes and methods.

include ‘profiler’

Profiler will give you out of each method, time is took to run in seconds and number of calls to this method made during your application execution window.

Profiler comes handy when you try to stress test your application so that you can see where and what type of bottlenecks are present in your program. Please note that Ruby profiler is not some sort of complex piece of software, but rather rudimentary code base that tends to provide approximation of time for each method to run.

Featured pages

Ruby

Set of Ruby Object Oriented Programming Language tutorials that cover such topics as Ruby strings, …

Rails

Rails Framework tutorial teaches you how to utilize de facto framework of choice for Ruby developme…

Ruby Duck Typing

“If an object quacks like a duck just go ahead and treat it as a duck” – this fun…

Regular Expressions

Ruby uses the =~ operator to check any given string against regular expression. For example, a stri…

Credit Card Number

Every last digit of any credit card is a check sum digit that is determined by all digits in front …

Ruby Arrays

Ruby Programming Language has built in support for Arrays. Arrays help you define some of the compl…

Ruby Hashes

Hashes are very similar to arrays in Ruby and hashes interface is similar to Ruby array interface. …

Ruby Code Block

Ruby is very unique language when it comes to code blocks. You can simply pass a code block to a me…