ring-file

Crates.ioring-file
lib.rsring-file
version0.2.3
created_at2025-07-28 20:25:13.490837+00
updated_at2025-09-06 18:10:21.513207+00
descriptionA debugging tool with ring buffer like file struture, for high-performance code development
homepage
repository
max_upload_size
id1771528
size22,295
Adam Ning (frostyplanet)

documentation

https://docs.rs/ring-file

README

RingFile

crates.io: crates.io docs.rs: docs.rs

The purpose of this tool is to help debug deadlock problems, that only occur under high-performance scenarios. Because writing log to disk will slow down execution, which makes deadlock hidden without racing conditions met.

This crate provides two abstraction:

RingBuffer: to store byte content in memory when written. when offset rewinds, new content will overwrite old content, so that memory consumption is limited to buf_size.

RingFile: to record log content in memory for multi-threaded program. Act as an observer to analyze concurrency problem. It maintain thread local buffer to avoid lock contention. Already integrated into captain-log as LogRingFile sink.

Commit count: 0

cargo fmt