fix: cache calculation

This commit is contained in:
2026-04-15 17:31:39 +08:00
parent 365ceac3be
commit ff316c6873
23 changed files with 500 additions and 336 deletions

View File

@@ -50,8 +50,7 @@ pub struct TraceReader {
impl TraceReader {
pub fn open<P: AsRef<Path>>(path: P, max_requests: Option<u64>) -> Result<Self> {
let path = path.as_ref();
let f = File::open(path)
.with_context(|| format!("opening trace {}", path.display()))?;
let f = File::open(path).with_context(|| format!("opening trace {}", path.display()))?;
Ok(Self {
inner: BufReader::with_capacity(1 << 20, f),
next_id: 0,