Skip to content
代码片段 群组 项目
未验证 提交 60da7090 编辑于 作者: Peter Leitzen's avatar Peter Leitzen
浏览文件

Improve performance of Rails backtrace cleaner configuration

Prefer Regexp#match?(String) over String#=~(Regexp).
上级 bb1405a1
No related branches found
No related tags found
加载中
---
title: Improve performance of Rails backtrace cleaner configuration
merge_request: 40182
author:
type: performance
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# This allows us to see the proper caller of SQL calls in {development,test}.log # This allows us to see the proper caller of SQL calls in {development,test}.log
if (Rails.env.development? || Rails.env.test?) && Gitlab.ee? if (Rails.env.development? || Rails.env.test?) && Gitlab.ee?
Rails.backtrace_cleaner.add_silencer { |line| line =~ %r(^ee/lib/gitlab/database/load_balancing) } Rails.backtrace_cleaner.add_silencer { |line| %r(^ee/lib/gitlab/database/load_balancing).match?(line) }
end end
Rails.backtrace_cleaner.add_silencer { |line| line !~ Gitlab::APP_DIRS_PATTERN } Rails.backtrace_cleaner.add_silencer { |line| !Gitlab::APP_DIRS_PATTERN.match?(line) }
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册