Skip to content

Fix rounding errors in Redis, Rugged and Gitaly call durations

Jacob Vosmaer requested to merge jv-redis-duration-rounding into master

What does this MR do?

This MR fixes a bug in how we record Redis, Rugged and Gitaly call durations for instrumentation purposes. The bug was that we were rounding intermediate results, which can cause small increments that might add up to a bigger value to get lost.

The practical impact of this bug is probably very small or non-existent, because we are talking about sub-microsecond rounding errors. However, the old code is an eyesore. The value in fixing it is to save humans reading this code the distraction of (1) noticing the bug, and (2) convincing themselves the practical impact is not an issue. It's easier on the mind if the bug isn't there in the first place.

Edited by Jacob Vosmaer

Merge request reports