Skip to content

Commit f42d1a0

Browse files
committed
More instrumentation
1 parent 1ed6b5b commit f42d1a0

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

graph/src/components/store/write.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -824,13 +824,19 @@ impl Batch {
824824
/// healthy by setting `self.error` to `Some(_)` and must not be written
825825
/// as it will be in an indeterminate state.
826826
pub fn append(&mut self, batch: Batch, stopwatch: &StopwatchMetrics) -> Result<(), StoreError> {
827-
let res = self.append_inner(batch, stopwatch);
828-
if let Err(e) = &res {
829-
self.error = Some(e.clone());
830-
}
827+
let res = {
828+
let _section = stopwatch.start_section("transact_block:append_batch:res_append");
829+
let res = self.append_inner(batch, stopwatch);
830+
if let Err(e) = &res {
831+
self.error = Some(e.clone());
832+
}
833+
_section.end();
834+
res
835+
};
831836
{
832-
stopwatch.start_section("transact_block:append_batch:weigh");
837+
let _section = stopwatch.start_section("transact_block:append_batch:weigh");
833838
self.weigh();
839+
_section.end();
834840
}
835841
res
836842
}

0 commit comments

Comments
 (0)