GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

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 @@ def profile(&block)
# 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