Dont request the stats when tracing diffs
What does this MR do and why?
When we are requesting the diff's for position tracing, we don't need to take into account for the diff stats. At the moment we are making an additional unneeded request for the git stats which we can stop. We also do not request the stats in another location related to position (https://gitlab.com/gitlab-org/gitlab/-/blob/71322bd13a0176c80dc5214551777683670d18be/lib/gitlab/diff/position.rb#L138), but I have added a feature flag nonetheless.
To Test:
- Turn on the performance bar
- Ensure feature flag
dont_request_stats_for_tracing
is off - Make a note on a diff
- Check the performance bar for gitaly calls, and check for diff_stats
- Turn on feature flag
dont_request_stats_for_tracing
- Make another note on diff
- Check the performance bar for gitaly calls, and that diff_stats wasn't called
Related Issue: #429225 (closed)
Edited by Marc Shaw