File tree 2 files changed +12
-0
lines changed
crates/search/src/searcher
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ pub(crate) fn text_compaction_searcher_latency_seconds() -> StatusTimer {
65
65
StatusTimer :: new ( & TEXT_COMPACTION_SEARCHER_LATENCY_SECONDS )
66
66
}
67
67
68
+ register_convex_histogram ! (
69
+ TEXT_QUERY_TERM_ORDINALS_SEARCHER_LATENCY_SECONDS ,
70
+ "The amount of time it took to query for term ordinals for values in Searcher (searchlight)" ,
71
+ & STATUS_LABEL ,
72
+ ) ;
73
+ pub ( crate ) fn text_query_term_ordinals_searcher_timer ( ) -> StatusTimer {
74
+ StatusTimer :: new ( & TEXT_QUERY_TERM_ORDINALS_SEARCHER_LATENCY_SECONDS )
75
+ }
76
+
68
77
register_convex_histogram ! (
69
78
SEARCHLIGHT_VECTOR_COMPACTION_PREFETCH_SECONDS ,
70
79
"The amount of time it takes to prefetch a new segment produced by vector compaction" ,
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ use crate::{
123
123
text_number_of_segments_searcher_latency_seconds,
124
124
text_query_bm25_searcher_latency_seconds,
125
125
text_query_posting_lists_searcher_latency_seconds,
126
+ text_query_term_ordinals_searcher_timer,
126
127
text_query_tokens_searcher_latency_seconds,
127
128
} ,
128
129
searchlight_knobs:: {
@@ -613,6 +614,7 @@ impl<RT: Runtime> SegmentTermMetadataFetcher for SearcherImpl<RT> {
613
614
segment : ObjectKey ,
614
615
field_to_term_values : BTreeMap < Field , Vec < TermValue > > ,
615
616
) -> anyhow:: Result < BTreeMap < Field , Vec < TermOrdinal > > > {
617
+ let timer = text_query_term_ordinals_searcher_timer ( ) ;
616
618
let segment_path = self
617
619
. archive_cache
618
620
. get ( search_storage, & segment, SearchFileType :: Text )
@@ -638,6 +640,7 @@ impl<RT: Runtime> SegmentTermMetadataFetcher for SearcherImpl<RT> {
638
640
}
639
641
field_to_term_ordinals. insert ( field, term_ordinals) ;
640
642
}
643
+ timer. finish ( ) ;
641
644
Ok ( field_to_term_ordinals)
642
645
}
643
646
}
You can’t perform that action at this time.
0 commit comments