Skip to content

Add query counts by model to profiler output

Sean McGivern requested to merge add-query-counts-to-profiler-output into master

I find this useful when working on issues like https://gitlab.com/gitlab-org/gitlab-ce/issues/43114. Sample output:

I, [2018-03-21T16:03:28.554680 #112001]  INFO -- : MergeRequestDiff total (17): 70.8ms
I, [2018-03-21T16:03:28.554821 #112001]  INFO -- : Upload total (11): 38.3ms
I, [2018-03-21T16:03:28.554860 #112001]  INFO -- : Build total (10): 36.0ms
I, [2018-03-21T16:03:28.554893 #112001]  INFO -- : User total (14): 31.3ms
I, [2018-03-21T16:03:28.554943 #112001]  INFO -- : Project total (8): 22.9ms
I, [2018-03-21T16:03:28.555058 #112001]  INFO -- : Group total (7): 21.6ms
I, [2018-03-21T16:03:28.555242 #112001]  INFO -- : Note total (1): 21.2ms
I, [2018-03-21T16:03:28.561281 #112001]  INFO -- : Namespace total (4): 18.8ms
I, [2018-03-21T16:03:28.561340 #112001]  INFO -- : GroupMember total (4): 17.8ms
I, [2018-03-21T16:03:28.561436 #112001]  INFO -- : SystemNoteMetadata total (1): 12.8ms
I, [2018-03-21T16:03:28.561523 #112001]  INFO -- : JobArtifact total (4): 12.5ms
I, [2018-03-21T16:03:28.561597 #112001]  INFO -- : MergeRequest total (4): 11.4ms
I, [2018-03-21T16:03:28.561674 #112001]  INFO -- : ProjectFeature total (4): 11.1ms
I, [2018-03-21T16:03:28.561746 #112001]  INFO -- : AwardEmoji total (2): 10.8ms
I, [2018-03-21T16:03:28.561825 #112001]  INFO -- : Issue total (2): 9.5ms
I, [2018-03-21T16:03:28.561932 #112001]  INFO -- : ApproverGroup total (2): 8.8ms
I, [2018-03-21T16:03:28.561977 #112001]  INFO -- : Approver total (2): 8.8ms
I, [2018-03-21T16:03:28.562064 #112001]  INFO -- : GitlabIssueTrackerService total (1): 8.7ms
I, [2018-03-21T16:03:28.562168 #112001]  INFO -- : Pipeline total (4): 8.2ms
I, [2018-03-21T16:03:28.562242 #112001]  INFO -- : Route total (4): 6.9ms
I, [2018-03-21T16:03:28.562353 #112001]  INFO -- : CommitStatus total (1): 5.2ms
I, [2018-03-21T16:03:28.562464 #112001]  INFO -- : ProtectedBranch total (3): 5.2ms
I, [2018-03-21T16:03:28.562537 #112001]  INFO -- : ProjectMember total (2): 3.9ms
I, [2018-03-21T16:03:28.562607 #112001]  INFO -- : Label total (1): 2.7ms
I, [2018-03-21T16:03:28.562678 #112001]  INFO -- : MergeRequestDiffCommit total (1): 2.6ms
I, [2018-03-21T16:03:28.562749 #112001]  INFO -- : IssueAssignee total (1): 2.3ms
I, [2018-03-21T16:03:28.562833 #112001]  INFO -- : ForkNetwork total (1): 2.2ms
I, [2018-03-21T16:03:28.562909 #112001]  INFO -- : MergeAccessLevel total (1): 2.1ms
I, [2018-03-21T16:03:28.562978 #112001]  INFO -- : Milestone total (1): 1.9ms
I, [2018-03-21T16:03:28.563048 #112001]  INFO -- : ForkedProjectLink total (1): 1.9ms
I, [2018-03-21T16:03:28.563142 #112001]  INFO -- : License total (1): 1.9ms
I, [2018-03-21T16:03:28.563217 #112001]  INFO -- : Plan total (1): 1.6ms

Merge request reports