@@ -25,16 +25,24 @@ pub enum ProfilerEvent {
2525 GenericActivityEnd { category : ProfileCategory , time : Instant } ,
2626 QueryCacheHit { query_name : & ' static str , category : ProfileCategory } ,
2727 QueryCount { query_name : & ' static str , category : ProfileCategory , count : usize } ,
28+ IncrementalLoadResultStart { query_name : & ' static str , time : Instant } ,
29+ IncrementalLoadResultEnd { query_name : & ' static str , time : Instant } ,
2830}
2931
3032impl ProfilerEvent {
3133 fn is_start_event ( & self ) -> bool {
3234 use self :: ProfilerEvent :: * ;
3335
3436 match self {
35- QueryStart { .. } | GenericActivityStart { .. } => true ,
36- QueryEnd { .. } | GenericActivityEnd { .. } |
37- QueryCacheHit { .. } | QueryCount { .. } => false ,
37+ QueryStart { .. } |
38+ GenericActivityStart { .. } |
39+ IncrementalLoadResultStart { .. } => true ,
40+
41+ QueryEnd { .. } |
42+ GenericActivityEnd { .. } |
43+ QueryCacheHit { .. } |
44+ QueryCount { .. } |
45+ IncrementalLoadResultEnd { .. } => false ,
3846 }
3947 }
4048}
@@ -225,6 +233,22 @@ impl SelfProfiler {
225233 } )
226234 }
227235
236+ #[ inline]
237+ pub fn incremental_load_result_start ( & mut self , query_name : & ' static str ) {
238+ self . record ( ProfilerEvent :: IncrementalLoadResultStart {
239+ query_name,
240+ time : Instant :: now ( ) ,
241+ } )
242+ }
243+
244+ #[ inline]
245+ pub fn incremental_load_result_end ( & mut self , query_name : & ' static str ) {
246+ self . record ( ProfilerEvent :: IncrementalLoadResultEnd {
247+ query_name,
248+ time : Instant :: now ( ) ,
249+ } )
250+ }
251+
228252 #[ inline]
229253 fn record ( & mut self , event : ProfilerEvent ) {
230254 let thread_id = std:: thread:: current ( ) . id ( ) ;
@@ -317,6 +341,8 @@ impl SelfProfiler {
317341 result_data. query_cache_stats . entry ( query_name) . or_insert ( ( 0 , 0 ) ) ;
318342 * totals += * count as u64 ;
319343 } ,
344+ //we don't summarize incremental load result events in the simple output mode
345+ IncrementalLoadResultStart { .. } | IncrementalLoadResultEnd { .. } => { } ,
320346 }
321347 }
322348
0 commit comments