Skip to content

Use Ruby file IO to read metrics files

Jacob Vosmaer requested to merge jv-ruby-loop into master

This MR implements a suggestion made in https://gitlab.com/gitlab-org/prometheus-client-mmap/-/issues/31#note_372173890

The idea is that we can use Ruby stdlib file IO to read metric files, which may be better than the status quo which is to do file IO while holding the GVL. The Ruby stdlib will release the GVL while doing IO. This approach saves us having to write C code to release/reacquire the GVL.

Edited by Jacob Vosmaer

Merge request reports