Skip to content

How to profile

epicmonkey edited this page Dec 9, 2014 · 2 revisions

There are at least two options how to profile the application, the first is Redis profiling and the second is profiling application itself.

Redis

To profile Redis storage you need redis-cli and MONITOR command:

$ redis-cli 
redis 127.0.0.1:6379> MONITOR
OK
1418123778.324437 [0 127.0.0.1:35640] "info"
1418123778.328175 [0 127.0.0.1:35640] "select" "0"

Pepyatka

For the application, say, we want to profile User model, so we load profile library:

  profiler = require('../../lib/profiler')

and then at the end of the class says to profile it:

  profiler.profile(User)
Clone this wiki locally