File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use std::ops::{Deref, Range};
33use std:: sync:: atomic:: { AtomicBool , Ordering } ;
44use std:: sync:: Mutex ;
55
6+ use graph:: components:: metrics:: stopwatch:: Section ;
67use graph:: parking_lot:: RwLock ;
78use std:: time:: Instant ;
89use std:: { collections:: BTreeMap , sync:: Arc } ;
@@ -865,6 +866,13 @@ impl Request {
865866 Request :: RevertTo { .. } | Request :: Stop => false ,
866867 }
867868 }
869+
870+ fn stopwatch_section ( & self , name : & str ) -> Option < Section > {
871+ match self {
872+ Request :: Write { stopwatch, .. } => Some ( stopwatch. start_section ( name) ) ,
873+ Request :: RevertTo { .. } | Request :: Stop => None ,
874+ }
875+ }
868876}
869877
870878/// A queue that asynchronously writes requests queued with `push` to the
@@ -1205,6 +1213,7 @@ impl Queue {
12051213 self . stopwatch . cheap_clone ( ) ,
12061214 batch,
12071215 ) ;
1216+ let _section = req. stopwatch_section ( "queue_push_blocked" ) ;
12081217 self . push ( req) . await ?;
12091218 }
12101219 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments