Add pipelined Redis commands to performance bar
What does this MR do and why?
This also includes them in redis_calls
, redis_duration_s
, and other related fields in the
logs.
Related to gitlab-com/gl-infra/scalability#1846 (closed)
Screenshots or screen recordings
How to set up and validate locally
-
Visit a project's page (
http://127.0.0.1:3000/flightjs/Flight
) -
In the Redis section of the performance bar, you should see:
For easier testing, I also tried something like this:
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index d2434d4b0ba..0b8ebb13922 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -12,6 +12,9 @@ class Dashboard::TodosController < Dashboard::ApplicationController
urgency :low
def index
+ Gitlab::Redis::Cache.with { |r| r.pipelined { |rr| rr.get('key1'); rr.get('key2'); } }
+ Gitlab::Redis::Cache.with { |r| r.multi { |rr| rr.set('key1', 'test'); rr.set('key2', 'test'); } }
+
@sort = params[:sort]
@todos = @todos.page(params[:page])
@todos = @todos.with_entity_associations
Just to force a URL to do some pipelined calls.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Heinrich Lee Yu