perf: use optimized circular buffer implementation to store measurements history