newrelic-rake released

    12 Oct 2012

    4 months ago, I released newrelic-workling gem, which helps us montior the performance of background jobs. We used it to find out a GC performance issue. But we still have some cron jobs, who call rake tasks, running in the black box.

    So I created a new project newrelic-rake that adds newrelic instrument for rake tasks. Now when I go to the newrelic, I can see the rake tasks listed in Background tasks section, it shows me the average execution time and call count for all rake tasks.

    newrelic rake tasks

    I can also see the performance breakdown for each rake...

    Read More


    rake arguments

    13 Dec 2011

    Long ago I began to write some rake tasks, it's simple but doesn't have an instruction about how to add arguments to a rake task. What I did before is to use ruby environment variables.

    task :try_argument do
    GLOBAL_ARGUMENT1=xxx GLOBAL_ARGUMENT2=yyy rake try_argument

    As you seen, I have to set the global environment variable to pass the arguement to a rake task.

    But there is another way to pass the arguments to rake task via []

    task :try_argument...
    Read More