We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a2edd2 commit 2fed93cCopy full SHA for 2fed93c
src/benchmarks/storage.rs
@@ -22,15 +22,15 @@ impl StorageBenchmark {
22
.create(true)
23
.write(true)
24
.open(&self.path)?;
25
- while true {
+ while remaining_size > 0 {
26
let chunk_size = min(self.chunk_size, remaining_size);
27
let _written = file.write(&buf[..chunk_size])?;
28
// Notice: somehow there's a bug or what making written size returning 0, which is
29
// obviously wrong. Before we fix that, we just calculate the remaining_size
30
// based on the size we have written
31
remaining_size -= chunk_size;
32
}
33
- file.sync_all();
+ file.sync_all()?;
34
let end = SystemTime::now();
35
let duration = end.duration_since(start)?;
36
log::info!(
0 commit comments