Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-10 15:10:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-10 15:10:12 +0300
commit419966e5d34a98d89354ed658c33478ce02d8017 (patch)
tree6a83543e53f483b59953febc8d61a23b19dd5ccb /lib/gitlab/middleware
parentbfbd788e0910597b93b31020300b15952828c386 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/middleware')
-rw-r--r--lib/gitlab/middleware/query_analyzer.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/gitlab/middleware/query_analyzer.rb b/lib/gitlab/middleware/query_analyzer.rb
new file mode 100644
index 00000000000..8d63c644a69
--- /dev/null
+++ b/lib/gitlab/middleware/query_analyzer.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Middleware
+ class QueryAnalyzer
+ def initialize(app)
+ @app = app
+ end
+
+ def call(env)
+ ::Gitlab::Database::QueryAnalyzer.instance.within { @app.call(env) }
+ end
+ end
+ end
+end