@@ -25,16 +25,24 @@ pub enum ProfilerEvent {
25
25
GenericActivityEnd { category : ProfileCategory , time : Instant } ,
26
26
QueryCacheHit { query_name : & ' static str , category : ProfileCategory } ,
27
27
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 } ,
28
30
}
29
31
30
32
impl ProfilerEvent {
31
33
fn is_start_event ( & self ) -> bool {
32
34
use self :: ProfilerEvent :: * ;
33
35
34
36
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 ,
38
46
}
39
47
}
40
48
}
@@ -225,6 +233,22 @@ impl SelfProfiler {
225
233
} )
226
234
}
227
235
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
+
228
252
#[ inline]
229
253
fn record ( & mut self , event : ProfilerEvent ) {
230
254
let thread_id = std:: thread:: current ( ) . id ( ) ;
@@ -317,6 +341,8 @@ impl SelfProfiler {
317
341
result_data. query_cache_stats . entry ( query_name) . or_insert ( ( 0 , 0 ) ) ;
318
342
* totals += * count as u64 ;
319
343
} ,
344
+ //we don't summarize incremental load result events in the simple output mode
345
+ IncrementalLoadResultStart { .. } | IncrementalLoadResultEnd { .. } => { } ,
320
346
}
321
347
}
322
348
0 commit comments