arriven / db1000n

MIT License
1.18k stars 208 forks source link

perf: add buffering in metrics table reporter #548

Closed deputinizer closed 2 years ago

deputinizer commented 2 years ago

Writing letter-by-letter is very inefficient. On kinda slow machines, the whole table was printing in like 10 seconds word by word. This commit prevents these write calls because now, everything is added to a 4096-byte buffer and flushed in the end. Multiple 1-byte write syscalls were made without buffering.

Description

Added buffering in metrics reporter.

Type of change

Tested