Avoid division by zero in Elasticsearch rate calculator
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101693 introduced a bytes per second timing calculation for the indexer that relied on `Time.current`. However, on some hosts `Time.current` may only have second precision, which leads to a division by 0 error. Fix this by using `Process.clock_gettime(Process::CLOCK_MONOTONIC)` to get a more accurate timestamp. Relates to https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/9336
想要评论请 注册 或 登录