From 8ceee5285bc9e50b3cdbd63239a19ed0ca2bb25a Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Wed, 30 Sep 2026 03:55:48 +0200 Subject: [PATCH] chore(fuse): log how long each queued upload takes "pending upload landed" now carries upload_ms, the time on the wire, and total_ms, the whole op including the conflict check and gap-fill. A slow drain then shows where its time goes without a profiler. --- crates/pdfs-fuse/src/drain.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/pdfs-fuse/src/drain.rs b/crates/pdfs-fuse/src/drain.rs index 41bffe8..8df9028 100644 --- a/crates/pdfs-fuse/src/drain.rs +++ b/crates/pdfs-fuse/src/drain.rs @@ -1537,6 +1537,7 @@ impl Core { /// Upload a staged revision of a file the server already knows about. pub(crate) fn drain_revision(&self, op: &PendingOp) -> Result<(), Box> { + let op_started = Instant::now(); let blob = op .blob_path .clone() @@ -1644,7 +1645,15 @@ impl Core { self.evict_reader(&uid); self.refresh_after_upload(&uid); self.log_activity(ActivityKind::Upload, &name, "uploaded", true); - info!(%uid, len = meta.len, "pending upload landed"); + // Both times, so a slow drain shows whether the upload itself or the + // checks and gap-fill around it are where the time goes. + info!( + %uid, + len = meta.len, + upload_ms = took.as_millis() as u64, + total_ms = op_started.elapsed().as_millis() as u64, + "pending upload landed" + ); Ok(()) }