Commit 73cf0f16 authored by Yorick Peterse's avatar Yorick Peterse

Only load rblineprof when actually needed

This ensures the application can still boot when the "development" group
is not available.
parent 26344c8f
require 'securerandom'
require 'rblineprof' if RUBY_ENGINE == 'ruby'
module Gitlab
module Sherlock
......
......@@ -40,6 +40,8 @@ module Gitlab
# Profiles the given block using rblineprof (MRI only).
def profile_mri
require 'rblineprof'
retval = nil
samples = lineprof(/^#{Rails.root.to_s}/) { retval = yield }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment