@@ -171,12 +171,14 @@ impl QueryExecutor for QueryExecutorImpl {
171171 ) -> Result < ( SchemaRef , Vec < RecordBatch > ) , CubeError > {
172172 let collect_span = tracing:: span!( tracing:: Level :: TRACE , "collect_physical_plan" ) ;
173173 let trace_obj = plan. trace_obj ( ) ;
174+ let create_router_physical_plan_time = SystemTime :: now ( ) ;
174175 let ( physical_plan, logical_plan) = self . router_plan ( plan, cluster) . await ?;
176+ app_metrics:: DATA_QUERY_CREATE_ROUTER_PHYSICAL_PLAN_MS . report ( create_router_physical_plan_time. elapsed ( ) ?. as_millis ( ) as i64 ) ;
175177 let split_plan = physical_plan;
176178
177179 trace ! (
178180 "Router Query Physical Plan: {}" ,
179- pp_phys_plan ( split_plan. as_ref( ) )
181+ pp_phys_plan_ext ( split_plan. as_ref( ) , & PPOptions { traverse_past_clustersend : true , .. PPOptions :: show_most ( ) } )
180182 ) ;
181183
182184 let flags = PhysicalPlanFlags :: with_execution_plan ( split_plan. as_ref ( ) ) ;
@@ -237,6 +239,7 @@ impl QueryExecutor for QueryExecutorImpl {
237239 chunk_id_to_record_batches : HashMap < u64 , Vec < RecordBatch > > ,
238240 ) -> Result < ( SchemaRef , Vec < RecordBatch > , usize ) , CubeError > {
239241 let data_loaded_size = DataLoadedSize :: new ( ) ;
242+ let create_worker_physical_plan_time = SystemTime :: now ( ) ;
240243 let ( physical_plan, logical_plan) = self
241244 . worker_plan (
242245 plan,
@@ -246,6 +249,8 @@ impl QueryExecutor for QueryExecutorImpl {
246249 Some ( data_loaded_size. clone ( ) ) ,
247250 )
248251 . await ?;
252+ app_metrics:: DATA_QUERY_CREATE_WORKER_PHYSICAL_PLAN_MS . report ( create_worker_physical_plan_time. elapsed ( ) ?. as_millis ( ) as i64 ) ;
253+
249254 let worker_plan;
250255 let max_batch_rows;
251256 if let Some ( ( p, s) ) = get_worker_plan ( & physical_plan) {
@@ -260,7 +265,7 @@ impl QueryExecutor for QueryExecutorImpl {
260265
261266 trace ! (
262267 "Partition Query Physical Plan: {}" ,
263- pp_phys_plan ( worker_plan. as_ref( ) )
268+ pp_phys_plan_ext ( worker_plan. as_ref( ) , & PPOptions :: show_most ( ) )
264269 ) ;
265270
266271 let execution_time = SystemTime :: now ( ) ;
0 commit comments