1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct StackTraceRequest {}
5#[derive(prost_helpers::AnyPB)]
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct StackTraceResponse {
8 #[prost(btree_map = "uint32, string", tag = "1")]
9 pub actor_traces: ::prost::alloc::collections::BTreeMap<
10 u32,
11 ::prost::alloc::string::String,
12 >,
13 #[prost(btree_map = "string, string", tag = "2")]
14 pub rpc_traces: ::prost::alloc::collections::BTreeMap<
15 ::prost::alloc::string::String,
16 ::prost::alloc::string::String,
17 >,
18 #[prost(btree_map = "string, string", tag = "3")]
19 pub compaction_task_traces: ::prost::alloc::collections::BTreeMap<
20 ::prost::alloc::string::String,
21 ::prost::alloc::string::String,
22 >,
23 #[prost(btree_map = "uint64, string", tag = "4")]
24 pub inflight_barrier_traces: ::prost::alloc::collections::BTreeMap<
25 u64,
26 ::prost::alloc::string::String,
27 >,
28 #[prost(btree_map = "uint32, string", tag = "5")]
30 pub barrier_worker_state: ::prost::alloc::collections::BTreeMap<
31 u32,
32 ::prost::alloc::string::String,
33 >,
34 #[prost(btree_map = "uint32, string", tag = "6")]
36 pub jvm_stack_traces: ::prost::alloc::collections::BTreeMap<
37 u32,
38 ::prost::alloc::string::String,
39 >,
40}
41#[derive(prost_helpers::AnyPB)]
43#[derive(Clone, Copy, PartialEq, ::prost::Message)]
44pub struct ProfilingRequest {
45 #[prost(uint64, tag = "1")]
47 pub sleep_s: u64,
48}
49#[derive(prost_helpers::AnyPB)]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct ProfilingResponse {
52 #[prost(bytes = "vec", tag = "1")]
53 pub result: ::prost::alloc::vec::Vec<u8>,
54}
55#[derive(prost_helpers::AnyPB)]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct HeapProfilingRequest {
59 #[prost(string, tag = "1")]
61 pub dir: ::prost::alloc::string::String,
62}
63#[derive(prost_helpers::AnyPB)]
64#[derive(Clone, Copy, PartialEq, ::prost::Message)]
65pub struct HeapProfilingResponse {}
66#[derive(prost_helpers::AnyPB)]
67#[derive(Clone, Copy, PartialEq, ::prost::Message)]
68pub struct ListHeapProfilingRequest {}
69#[derive(prost_helpers::AnyPB)]
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct ListHeapProfilingResponse {
72 #[prost(string, tag = "1")]
73 pub dir: ::prost::alloc::string::String,
74 #[prost(string, repeated, tag = "2")]
75 pub name_manually: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
76 #[prost(string, repeated, tag = "3")]
77 pub name_auto: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
78}
79#[derive(prost_helpers::AnyPB)]
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct AnalyzeHeapRequest {
83 #[prost(string, tag = "1")]
85 pub path: ::prost::alloc::string::String,
86}
87#[derive(prost_helpers::AnyPB)]
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct AnalyzeHeapResponse {
90 #[prost(bytes = "vec", tag = "1")]
91 pub result: ::prost::alloc::vec::Vec<u8>,
92}
93#[derive(prost_helpers::AnyPB)]
95#[derive(Clone, Copy, PartialEq, ::prost::Message)]
96pub struct GetStreamingStatsRequest {}
97#[derive(prost_helpers::AnyPB)]
98#[derive(Clone, Copy, PartialEq, ::prost::Message)]
99pub struct ChannelStats {
100 #[prost(uint32, tag = "1")]
104 pub actor_count: u32,
105 #[prost(double, tag = "2")]
107 pub output_blocking_duration: f64,
108 #[prost(uint64, tag = "3")]
110 pub recv_row_count: u64,
111 #[prost(uint64, tag = "4")]
113 pub send_row_count: u64,
114}
115#[derive(prost_helpers::AnyPB)]
116#[derive(Clone, Copy, PartialEq, ::prost::Message)]
117pub struct FragmentStats {
118 #[prost(uint32, tag = "2")]
119 pub actor_count: u32,
120 #[prost(uint64, tag = "3")]
121 pub current_epoch: u64,
122}
123#[derive(prost_helpers::AnyPB)]
124#[derive(Clone, Copy, PartialEq, ::prost::Message)]
125pub struct RelationStats {
126 #[prost(uint32, tag = "2")]
127 pub actor_count: u32,
128 #[prost(uint64, tag = "3")]
129 pub current_epoch: u64,
130}
131#[derive(prost_helpers::AnyPB)]
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct GetStreamingStatsResponse {
134 #[prost(map = "string, message", tag = "1")]
136 pub channel_stats: ::std::collections::HashMap<
137 ::prost::alloc::string::String,
138 ChannelStats,
139 >,
140 #[prost(map = "uint32, message", tag = "2")]
141 pub fragment_stats: ::std::collections::HashMap<u32, FragmentStats>,
142 #[prost(map = "uint32, message", tag = "3")]
143 pub relation_stats: ::std::collections::HashMap<u32, RelationStats>,
144}
145#[derive(prost_helpers::AnyPB)]
146#[derive(Clone, Copy, PartialEq, ::prost::Message)]
147pub struct TieredCacheTracingRequest {
148 #[prost(bool, tag = "1")]
149 pub enable: bool,
150 #[prost(uint32, optional, tag = "2")]
151 pub record_hybrid_insert_threshold_ms: ::core::option::Option<u32>,
152 #[prost(uint32, optional, tag = "3")]
153 pub record_hybrid_get_threshold_ms: ::core::option::Option<u32>,
154 #[prost(uint32, optional, tag = "4")]
155 pub record_hybrid_obtain_threshold_ms: ::core::option::Option<u32>,
156 #[prost(uint32, optional, tag = "5")]
157 pub record_hybrid_remove_threshold_ms: ::core::option::Option<u32>,
158 #[prost(uint32, optional, tag = "6")]
159 pub record_hybrid_fetch_threshold_ms: ::core::option::Option<u32>,
160}
161#[derive(prost_helpers::AnyPB)]
162#[derive(Clone, Copy, PartialEq, ::prost::Message)]
163pub struct TieredCacheTracingResponse {}
164#[derive(prost_helpers::AnyPB)]
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct GetProfileStatsRequest {
167 #[prost(uint64, repeated, tag = "1")]
169 pub executor_ids: ::prost::alloc::vec::Vec<u64>,
170 #[prost(uint32, repeated, tag = "2")]
173 pub dispatcher_fragment_ids: ::prost::alloc::vec::Vec<u32>,
174}
175#[derive(prost_helpers::AnyPB)]
176#[derive(Clone, PartialEq, ::prost::Message)]
177pub struct GetProfileStatsResponse {
178 #[prost(map = "uint64, uint64", tag = "1")]
179 pub stream_node_output_row_count: ::std::collections::HashMap<u64, u64>,
180 #[prost(map = "uint64, uint64", tag = "2")]
181 pub stream_node_output_blocking_duration_ns: ::std::collections::HashMap<u64, u64>,
182 #[prost(map = "uint32, uint64", tag = "3")]
183 pub dispatch_fragment_output_row_count: ::std::collections::HashMap<u32, u64>,
184 #[prost(map = "uint32, uint64", tag = "4")]
185 pub dispatch_fragment_output_blocking_duration_ns: ::std::collections::HashMap<
186 u32,
187 u64,
188 >,
189}
190pub mod monitor_service_client {
192 #![allow(
193 unused_variables,
194 dead_code,
195 missing_docs,
196 clippy::wildcard_imports,
197 clippy::let_unit_value,
198 )]
199 use tonic::codegen::*;
200 use tonic::codegen::http::Uri;
201 #[derive(Debug, Clone)]
202 pub struct MonitorServiceClient<T> {
203 inner: tonic::client::Grpc<T>,
204 }
205 impl MonitorServiceClient<tonic::transport::Channel> {
206 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
208 where
209 D: TryInto<tonic::transport::Endpoint>,
210 D::Error: Into<StdError>,
211 {
212 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
213 Ok(Self::new(conn))
214 }
215 }
216 impl<T> MonitorServiceClient<T>
217 where
218 T: tonic::client::GrpcService<tonic::body::BoxBody>,
219 T::Error: Into<StdError>,
220 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
221 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
222 {
223 pub fn new(inner: T) -> Self {
224 let inner = tonic::client::Grpc::new(inner);
225 Self { inner }
226 }
227 pub fn with_origin(inner: T, origin: Uri) -> Self {
228 let inner = tonic::client::Grpc::with_origin(inner, origin);
229 Self { inner }
230 }
231 pub fn with_interceptor<F>(
232 inner: T,
233 interceptor: F,
234 ) -> MonitorServiceClient<InterceptedService<T, F>>
235 where
236 F: tonic::service::Interceptor,
237 T::ResponseBody: Default,
238 T: tonic::codegen::Service<
239 http::Request<tonic::body::BoxBody>,
240 Response = http::Response<
241 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
242 >,
243 >,
244 <T as tonic::codegen::Service<
245 http::Request<tonic::body::BoxBody>,
246 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
247 {
248 MonitorServiceClient::new(InterceptedService::new(inner, interceptor))
249 }
250 #[must_use]
255 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
256 self.inner = self.inner.send_compressed(encoding);
257 self
258 }
259 #[must_use]
261 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
262 self.inner = self.inner.accept_compressed(encoding);
263 self
264 }
265 #[must_use]
269 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
270 self.inner = self.inner.max_decoding_message_size(limit);
271 self
272 }
273 #[must_use]
277 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
278 self.inner = self.inner.max_encoding_message_size(limit);
279 self
280 }
281 pub async fn stack_trace(
282 &mut self,
283 request: impl tonic::IntoRequest<super::StackTraceRequest>,
284 ) -> std::result::Result<
285 tonic::Response<super::StackTraceResponse>,
286 tonic::Status,
287 > {
288 self.inner
289 .ready()
290 .await
291 .map_err(|e| {
292 tonic::Status::unknown(
293 format!("Service was not ready: {}", e.into()),
294 )
295 })?;
296 let codec = tonic::codec::ProstCodec::default();
297 let path = http::uri::PathAndQuery::from_static(
298 "/monitor_service.MonitorService/StackTrace",
299 );
300 let mut req = request.into_request();
301 req.extensions_mut()
302 .insert(GrpcMethod::new("monitor_service.MonitorService", "StackTrace"));
303 self.inner.unary(req, path, codec).await
304 }
305 pub async fn profiling(
306 &mut self,
307 request: impl tonic::IntoRequest<super::ProfilingRequest>,
308 ) -> std::result::Result<
309 tonic::Response<super::ProfilingResponse>,
310 tonic::Status,
311 > {
312 self.inner
313 .ready()
314 .await
315 .map_err(|e| {
316 tonic::Status::unknown(
317 format!("Service was not ready: {}", e.into()),
318 )
319 })?;
320 let codec = tonic::codec::ProstCodec::default();
321 let path = http::uri::PathAndQuery::from_static(
322 "/monitor_service.MonitorService/Profiling",
323 );
324 let mut req = request.into_request();
325 req.extensions_mut()
326 .insert(GrpcMethod::new("monitor_service.MonitorService", "Profiling"));
327 self.inner.unary(req, path, codec).await
328 }
329 pub async fn heap_profiling(
330 &mut self,
331 request: impl tonic::IntoRequest<super::HeapProfilingRequest>,
332 ) -> std::result::Result<
333 tonic::Response<super::HeapProfilingResponse>,
334 tonic::Status,
335 > {
336 self.inner
337 .ready()
338 .await
339 .map_err(|e| {
340 tonic::Status::unknown(
341 format!("Service was not ready: {}", e.into()),
342 )
343 })?;
344 let codec = tonic::codec::ProstCodec::default();
345 let path = http::uri::PathAndQuery::from_static(
346 "/monitor_service.MonitorService/HeapProfiling",
347 );
348 let mut req = request.into_request();
349 req.extensions_mut()
350 .insert(
351 GrpcMethod::new("monitor_service.MonitorService", "HeapProfiling"),
352 );
353 self.inner.unary(req, path, codec).await
354 }
355 pub async fn list_heap_profiling(
356 &mut self,
357 request: impl tonic::IntoRequest<super::ListHeapProfilingRequest>,
358 ) -> std::result::Result<
359 tonic::Response<super::ListHeapProfilingResponse>,
360 tonic::Status,
361 > {
362 self.inner
363 .ready()
364 .await
365 .map_err(|e| {
366 tonic::Status::unknown(
367 format!("Service was not ready: {}", e.into()),
368 )
369 })?;
370 let codec = tonic::codec::ProstCodec::default();
371 let path = http::uri::PathAndQuery::from_static(
372 "/monitor_service.MonitorService/ListHeapProfiling",
373 );
374 let mut req = request.into_request();
375 req.extensions_mut()
376 .insert(
377 GrpcMethod::new(
378 "monitor_service.MonitorService",
379 "ListHeapProfiling",
380 ),
381 );
382 self.inner.unary(req, path, codec).await
383 }
384 pub async fn analyze_heap(
385 &mut self,
386 request: impl tonic::IntoRequest<super::AnalyzeHeapRequest>,
387 ) -> std::result::Result<
388 tonic::Response<super::AnalyzeHeapResponse>,
389 tonic::Status,
390 > {
391 self.inner
392 .ready()
393 .await
394 .map_err(|e| {
395 tonic::Status::unknown(
396 format!("Service was not ready: {}", e.into()),
397 )
398 })?;
399 let codec = tonic::codec::ProstCodec::default();
400 let path = http::uri::PathAndQuery::from_static(
401 "/monitor_service.MonitorService/AnalyzeHeap",
402 );
403 let mut req = request.into_request();
404 req.extensions_mut()
405 .insert(
406 GrpcMethod::new("monitor_service.MonitorService", "AnalyzeHeap"),
407 );
408 self.inner.unary(req, path, codec).await
409 }
410 pub async fn get_streaming_stats(
411 &mut self,
412 request: impl tonic::IntoRequest<super::GetStreamingStatsRequest>,
413 ) -> std::result::Result<
414 tonic::Response<super::GetStreamingStatsResponse>,
415 tonic::Status,
416 > {
417 self.inner
418 .ready()
419 .await
420 .map_err(|e| {
421 tonic::Status::unknown(
422 format!("Service was not ready: {}", e.into()),
423 )
424 })?;
425 let codec = tonic::codec::ProstCodec::default();
426 let path = http::uri::PathAndQuery::from_static(
427 "/monitor_service.MonitorService/GetStreamingStats",
428 );
429 let mut req = request.into_request();
430 req.extensions_mut()
431 .insert(
432 GrpcMethod::new(
433 "monitor_service.MonitorService",
434 "GetStreamingStats",
435 ),
436 );
437 self.inner.unary(req, path, codec).await
438 }
439 pub async fn tiered_cache_tracing(
440 &mut self,
441 request: impl tonic::IntoRequest<super::TieredCacheTracingRequest>,
442 ) -> std::result::Result<
443 tonic::Response<super::TieredCacheTracingResponse>,
444 tonic::Status,
445 > {
446 self.inner
447 .ready()
448 .await
449 .map_err(|e| {
450 tonic::Status::unknown(
451 format!("Service was not ready: {}", e.into()),
452 )
453 })?;
454 let codec = tonic::codec::ProstCodec::default();
455 let path = http::uri::PathAndQuery::from_static(
456 "/monitor_service.MonitorService/TieredCacheTracing",
457 );
458 let mut req = request.into_request();
459 req.extensions_mut()
460 .insert(
461 GrpcMethod::new(
462 "monitor_service.MonitorService",
463 "TieredCacheTracing",
464 ),
465 );
466 self.inner.unary(req, path, codec).await
467 }
468 pub async fn get_profile_stats(
469 &mut self,
470 request: impl tonic::IntoRequest<super::GetProfileStatsRequest>,
471 ) -> std::result::Result<
472 tonic::Response<super::GetProfileStatsResponse>,
473 tonic::Status,
474 > {
475 self.inner
476 .ready()
477 .await
478 .map_err(|e| {
479 tonic::Status::unknown(
480 format!("Service was not ready: {}", e.into()),
481 )
482 })?;
483 let codec = tonic::codec::ProstCodec::default();
484 let path = http::uri::PathAndQuery::from_static(
485 "/monitor_service.MonitorService/GetProfileStats",
486 );
487 let mut req = request.into_request();
488 req.extensions_mut()
489 .insert(
490 GrpcMethod::new("monitor_service.MonitorService", "GetProfileStats"),
491 );
492 self.inner.unary(req, path, codec).await
493 }
494 }
495}
496pub mod monitor_service_server {
498 #![allow(
499 unused_variables,
500 dead_code,
501 missing_docs,
502 clippy::wildcard_imports,
503 clippy::let_unit_value,
504 )]
505 use tonic::codegen::*;
506 #[async_trait]
508 pub trait MonitorService: std::marker::Send + std::marker::Sync + 'static {
509 async fn stack_trace(
510 &self,
511 request: tonic::Request<super::StackTraceRequest>,
512 ) -> std::result::Result<
513 tonic::Response<super::StackTraceResponse>,
514 tonic::Status,
515 >;
516 async fn profiling(
517 &self,
518 request: tonic::Request<super::ProfilingRequest>,
519 ) -> std::result::Result<
520 tonic::Response<super::ProfilingResponse>,
521 tonic::Status,
522 >;
523 async fn heap_profiling(
524 &self,
525 request: tonic::Request<super::HeapProfilingRequest>,
526 ) -> std::result::Result<
527 tonic::Response<super::HeapProfilingResponse>,
528 tonic::Status,
529 >;
530 async fn list_heap_profiling(
531 &self,
532 request: tonic::Request<super::ListHeapProfilingRequest>,
533 ) -> std::result::Result<
534 tonic::Response<super::ListHeapProfilingResponse>,
535 tonic::Status,
536 >;
537 async fn analyze_heap(
538 &self,
539 request: tonic::Request<super::AnalyzeHeapRequest>,
540 ) -> std::result::Result<
541 tonic::Response<super::AnalyzeHeapResponse>,
542 tonic::Status,
543 >;
544 async fn get_streaming_stats(
545 &self,
546 request: tonic::Request<super::GetStreamingStatsRequest>,
547 ) -> std::result::Result<
548 tonic::Response<super::GetStreamingStatsResponse>,
549 tonic::Status,
550 >;
551 async fn tiered_cache_tracing(
552 &self,
553 request: tonic::Request<super::TieredCacheTracingRequest>,
554 ) -> std::result::Result<
555 tonic::Response<super::TieredCacheTracingResponse>,
556 tonic::Status,
557 >;
558 async fn get_profile_stats(
559 &self,
560 request: tonic::Request<super::GetProfileStatsRequest>,
561 ) -> std::result::Result<
562 tonic::Response<super::GetProfileStatsResponse>,
563 tonic::Status,
564 >;
565 }
566 #[derive(Debug)]
567 pub struct MonitorServiceServer<T> {
568 inner: Arc<T>,
569 accept_compression_encodings: EnabledCompressionEncodings,
570 send_compression_encodings: EnabledCompressionEncodings,
571 max_decoding_message_size: Option<usize>,
572 max_encoding_message_size: Option<usize>,
573 }
574 impl<T> MonitorServiceServer<T> {
575 pub fn new(inner: T) -> Self {
576 Self::from_arc(Arc::new(inner))
577 }
578 pub fn from_arc(inner: Arc<T>) -> Self {
579 Self {
580 inner,
581 accept_compression_encodings: Default::default(),
582 send_compression_encodings: Default::default(),
583 max_decoding_message_size: None,
584 max_encoding_message_size: None,
585 }
586 }
587 pub fn with_interceptor<F>(
588 inner: T,
589 interceptor: F,
590 ) -> InterceptedService<Self, F>
591 where
592 F: tonic::service::Interceptor,
593 {
594 InterceptedService::new(Self::new(inner), interceptor)
595 }
596 #[must_use]
598 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
599 self.accept_compression_encodings.enable(encoding);
600 self
601 }
602 #[must_use]
604 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
605 self.send_compression_encodings.enable(encoding);
606 self
607 }
608 #[must_use]
612 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
613 self.max_decoding_message_size = Some(limit);
614 self
615 }
616 #[must_use]
620 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
621 self.max_encoding_message_size = Some(limit);
622 self
623 }
624 }
625 impl<T, B> tonic::codegen::Service<http::Request<B>> for MonitorServiceServer<T>
626 where
627 T: MonitorService,
628 B: Body + std::marker::Send + 'static,
629 B::Error: Into<StdError> + std::marker::Send + 'static,
630 {
631 type Response = http::Response<tonic::body::BoxBody>;
632 type Error = std::convert::Infallible;
633 type Future = BoxFuture<Self::Response, Self::Error>;
634 fn poll_ready(
635 &mut self,
636 _cx: &mut Context<'_>,
637 ) -> Poll<std::result::Result<(), Self::Error>> {
638 Poll::Ready(Ok(()))
639 }
640 fn call(&mut self, req: http::Request<B>) -> Self::Future {
641 match req.uri().path() {
642 "/monitor_service.MonitorService/StackTrace" => {
643 #[allow(non_camel_case_types)]
644 struct StackTraceSvc<T: MonitorService>(pub Arc<T>);
645 impl<
646 T: MonitorService,
647 > tonic::server::UnaryService<super::StackTraceRequest>
648 for StackTraceSvc<T> {
649 type Response = super::StackTraceResponse;
650 type Future = BoxFuture<
651 tonic::Response<Self::Response>,
652 tonic::Status,
653 >;
654 fn call(
655 &mut self,
656 request: tonic::Request<super::StackTraceRequest>,
657 ) -> Self::Future {
658 let inner = Arc::clone(&self.0);
659 let fut = async move {
660 <T as MonitorService>::stack_trace(&inner, request).await
661 };
662 Box::pin(fut)
663 }
664 }
665 let accept_compression_encodings = self.accept_compression_encodings;
666 let send_compression_encodings = self.send_compression_encodings;
667 let max_decoding_message_size = self.max_decoding_message_size;
668 let max_encoding_message_size = self.max_encoding_message_size;
669 let inner = self.inner.clone();
670 let fut = async move {
671 let method = StackTraceSvc(inner);
672 let codec = tonic::codec::ProstCodec::default();
673 let mut grpc = tonic::server::Grpc::new(codec)
674 .apply_compression_config(
675 accept_compression_encodings,
676 send_compression_encodings,
677 )
678 .apply_max_message_size_config(
679 max_decoding_message_size,
680 max_encoding_message_size,
681 );
682 let res = grpc.unary(method, req).await;
683 Ok(res)
684 };
685 Box::pin(fut)
686 }
687 "/monitor_service.MonitorService/Profiling" => {
688 #[allow(non_camel_case_types)]
689 struct ProfilingSvc<T: MonitorService>(pub Arc<T>);
690 impl<
691 T: MonitorService,
692 > tonic::server::UnaryService<super::ProfilingRequest>
693 for ProfilingSvc<T> {
694 type Response = super::ProfilingResponse;
695 type Future = BoxFuture<
696 tonic::Response<Self::Response>,
697 tonic::Status,
698 >;
699 fn call(
700 &mut self,
701 request: tonic::Request<super::ProfilingRequest>,
702 ) -> Self::Future {
703 let inner = Arc::clone(&self.0);
704 let fut = async move {
705 <T as MonitorService>::profiling(&inner, request).await
706 };
707 Box::pin(fut)
708 }
709 }
710 let accept_compression_encodings = self.accept_compression_encodings;
711 let send_compression_encodings = self.send_compression_encodings;
712 let max_decoding_message_size = self.max_decoding_message_size;
713 let max_encoding_message_size = self.max_encoding_message_size;
714 let inner = self.inner.clone();
715 let fut = async move {
716 let method = ProfilingSvc(inner);
717 let codec = tonic::codec::ProstCodec::default();
718 let mut grpc = tonic::server::Grpc::new(codec)
719 .apply_compression_config(
720 accept_compression_encodings,
721 send_compression_encodings,
722 )
723 .apply_max_message_size_config(
724 max_decoding_message_size,
725 max_encoding_message_size,
726 );
727 let res = grpc.unary(method, req).await;
728 Ok(res)
729 };
730 Box::pin(fut)
731 }
732 "/monitor_service.MonitorService/HeapProfiling" => {
733 #[allow(non_camel_case_types)]
734 struct HeapProfilingSvc<T: MonitorService>(pub Arc<T>);
735 impl<
736 T: MonitorService,
737 > tonic::server::UnaryService<super::HeapProfilingRequest>
738 for HeapProfilingSvc<T> {
739 type Response = super::HeapProfilingResponse;
740 type Future = BoxFuture<
741 tonic::Response<Self::Response>,
742 tonic::Status,
743 >;
744 fn call(
745 &mut self,
746 request: tonic::Request<super::HeapProfilingRequest>,
747 ) -> Self::Future {
748 let inner = Arc::clone(&self.0);
749 let fut = async move {
750 <T as MonitorService>::heap_profiling(&inner, request).await
751 };
752 Box::pin(fut)
753 }
754 }
755 let accept_compression_encodings = self.accept_compression_encodings;
756 let send_compression_encodings = self.send_compression_encodings;
757 let max_decoding_message_size = self.max_decoding_message_size;
758 let max_encoding_message_size = self.max_encoding_message_size;
759 let inner = self.inner.clone();
760 let fut = async move {
761 let method = HeapProfilingSvc(inner);
762 let codec = tonic::codec::ProstCodec::default();
763 let mut grpc = tonic::server::Grpc::new(codec)
764 .apply_compression_config(
765 accept_compression_encodings,
766 send_compression_encodings,
767 )
768 .apply_max_message_size_config(
769 max_decoding_message_size,
770 max_encoding_message_size,
771 );
772 let res = grpc.unary(method, req).await;
773 Ok(res)
774 };
775 Box::pin(fut)
776 }
777 "/monitor_service.MonitorService/ListHeapProfiling" => {
778 #[allow(non_camel_case_types)]
779 struct ListHeapProfilingSvc<T: MonitorService>(pub Arc<T>);
780 impl<
781 T: MonitorService,
782 > tonic::server::UnaryService<super::ListHeapProfilingRequest>
783 for ListHeapProfilingSvc<T> {
784 type Response = super::ListHeapProfilingResponse;
785 type Future = BoxFuture<
786 tonic::Response<Self::Response>,
787 tonic::Status,
788 >;
789 fn call(
790 &mut self,
791 request: tonic::Request<super::ListHeapProfilingRequest>,
792 ) -> Self::Future {
793 let inner = Arc::clone(&self.0);
794 let fut = async move {
795 <T as MonitorService>::list_heap_profiling(&inner, request)
796 .await
797 };
798 Box::pin(fut)
799 }
800 }
801 let accept_compression_encodings = self.accept_compression_encodings;
802 let send_compression_encodings = self.send_compression_encodings;
803 let max_decoding_message_size = self.max_decoding_message_size;
804 let max_encoding_message_size = self.max_encoding_message_size;
805 let inner = self.inner.clone();
806 let fut = async move {
807 let method = ListHeapProfilingSvc(inner);
808 let codec = tonic::codec::ProstCodec::default();
809 let mut grpc = tonic::server::Grpc::new(codec)
810 .apply_compression_config(
811 accept_compression_encodings,
812 send_compression_encodings,
813 )
814 .apply_max_message_size_config(
815 max_decoding_message_size,
816 max_encoding_message_size,
817 );
818 let res = grpc.unary(method, req).await;
819 Ok(res)
820 };
821 Box::pin(fut)
822 }
823 "/monitor_service.MonitorService/AnalyzeHeap" => {
824 #[allow(non_camel_case_types)]
825 struct AnalyzeHeapSvc<T: MonitorService>(pub Arc<T>);
826 impl<
827 T: MonitorService,
828 > tonic::server::UnaryService<super::AnalyzeHeapRequest>
829 for AnalyzeHeapSvc<T> {
830 type Response = super::AnalyzeHeapResponse;
831 type Future = BoxFuture<
832 tonic::Response<Self::Response>,
833 tonic::Status,
834 >;
835 fn call(
836 &mut self,
837 request: tonic::Request<super::AnalyzeHeapRequest>,
838 ) -> Self::Future {
839 let inner = Arc::clone(&self.0);
840 let fut = async move {
841 <T as MonitorService>::analyze_heap(&inner, request).await
842 };
843 Box::pin(fut)
844 }
845 }
846 let accept_compression_encodings = self.accept_compression_encodings;
847 let send_compression_encodings = self.send_compression_encodings;
848 let max_decoding_message_size = self.max_decoding_message_size;
849 let max_encoding_message_size = self.max_encoding_message_size;
850 let inner = self.inner.clone();
851 let fut = async move {
852 let method = AnalyzeHeapSvc(inner);
853 let codec = tonic::codec::ProstCodec::default();
854 let mut grpc = tonic::server::Grpc::new(codec)
855 .apply_compression_config(
856 accept_compression_encodings,
857 send_compression_encodings,
858 )
859 .apply_max_message_size_config(
860 max_decoding_message_size,
861 max_encoding_message_size,
862 );
863 let res = grpc.unary(method, req).await;
864 Ok(res)
865 };
866 Box::pin(fut)
867 }
868 "/monitor_service.MonitorService/GetStreamingStats" => {
869 #[allow(non_camel_case_types)]
870 struct GetStreamingStatsSvc<T: MonitorService>(pub Arc<T>);
871 impl<
872 T: MonitorService,
873 > tonic::server::UnaryService<super::GetStreamingStatsRequest>
874 for GetStreamingStatsSvc<T> {
875 type Response = super::GetStreamingStatsResponse;
876 type Future = BoxFuture<
877 tonic::Response<Self::Response>,
878 tonic::Status,
879 >;
880 fn call(
881 &mut self,
882 request: tonic::Request<super::GetStreamingStatsRequest>,
883 ) -> Self::Future {
884 let inner = Arc::clone(&self.0);
885 let fut = async move {
886 <T as MonitorService>::get_streaming_stats(&inner, request)
887 .await
888 };
889 Box::pin(fut)
890 }
891 }
892 let accept_compression_encodings = self.accept_compression_encodings;
893 let send_compression_encodings = self.send_compression_encodings;
894 let max_decoding_message_size = self.max_decoding_message_size;
895 let max_encoding_message_size = self.max_encoding_message_size;
896 let inner = self.inner.clone();
897 let fut = async move {
898 let method = GetStreamingStatsSvc(inner);
899 let codec = tonic::codec::ProstCodec::default();
900 let mut grpc = tonic::server::Grpc::new(codec)
901 .apply_compression_config(
902 accept_compression_encodings,
903 send_compression_encodings,
904 )
905 .apply_max_message_size_config(
906 max_decoding_message_size,
907 max_encoding_message_size,
908 );
909 let res = grpc.unary(method, req).await;
910 Ok(res)
911 };
912 Box::pin(fut)
913 }
914 "/monitor_service.MonitorService/TieredCacheTracing" => {
915 #[allow(non_camel_case_types)]
916 struct TieredCacheTracingSvc<T: MonitorService>(pub Arc<T>);
917 impl<
918 T: MonitorService,
919 > tonic::server::UnaryService<super::TieredCacheTracingRequest>
920 for TieredCacheTracingSvc<T> {
921 type Response = super::TieredCacheTracingResponse;
922 type Future = BoxFuture<
923 tonic::Response<Self::Response>,
924 tonic::Status,
925 >;
926 fn call(
927 &mut self,
928 request: tonic::Request<super::TieredCacheTracingRequest>,
929 ) -> Self::Future {
930 let inner = Arc::clone(&self.0);
931 let fut = async move {
932 <T as MonitorService>::tiered_cache_tracing(&inner, request)
933 .await
934 };
935 Box::pin(fut)
936 }
937 }
938 let accept_compression_encodings = self.accept_compression_encodings;
939 let send_compression_encodings = self.send_compression_encodings;
940 let max_decoding_message_size = self.max_decoding_message_size;
941 let max_encoding_message_size = self.max_encoding_message_size;
942 let inner = self.inner.clone();
943 let fut = async move {
944 let method = TieredCacheTracingSvc(inner);
945 let codec = tonic::codec::ProstCodec::default();
946 let mut grpc = tonic::server::Grpc::new(codec)
947 .apply_compression_config(
948 accept_compression_encodings,
949 send_compression_encodings,
950 )
951 .apply_max_message_size_config(
952 max_decoding_message_size,
953 max_encoding_message_size,
954 );
955 let res = grpc.unary(method, req).await;
956 Ok(res)
957 };
958 Box::pin(fut)
959 }
960 "/monitor_service.MonitorService/GetProfileStats" => {
961 #[allow(non_camel_case_types)]
962 struct GetProfileStatsSvc<T: MonitorService>(pub Arc<T>);
963 impl<
964 T: MonitorService,
965 > tonic::server::UnaryService<super::GetProfileStatsRequest>
966 for GetProfileStatsSvc<T> {
967 type Response = super::GetProfileStatsResponse;
968 type Future = BoxFuture<
969 tonic::Response<Self::Response>,
970 tonic::Status,
971 >;
972 fn call(
973 &mut self,
974 request: tonic::Request<super::GetProfileStatsRequest>,
975 ) -> Self::Future {
976 let inner = Arc::clone(&self.0);
977 let fut = async move {
978 <T as MonitorService>::get_profile_stats(&inner, request)
979 .await
980 };
981 Box::pin(fut)
982 }
983 }
984 let accept_compression_encodings = self.accept_compression_encodings;
985 let send_compression_encodings = self.send_compression_encodings;
986 let max_decoding_message_size = self.max_decoding_message_size;
987 let max_encoding_message_size = self.max_encoding_message_size;
988 let inner = self.inner.clone();
989 let fut = async move {
990 let method = GetProfileStatsSvc(inner);
991 let codec = tonic::codec::ProstCodec::default();
992 let mut grpc = tonic::server::Grpc::new(codec)
993 .apply_compression_config(
994 accept_compression_encodings,
995 send_compression_encodings,
996 )
997 .apply_max_message_size_config(
998 max_decoding_message_size,
999 max_encoding_message_size,
1000 );
1001 let res = grpc.unary(method, req).await;
1002 Ok(res)
1003 };
1004 Box::pin(fut)
1005 }
1006 _ => {
1007 Box::pin(async move {
1008 let mut response = http::Response::new(empty_body());
1009 let headers = response.headers_mut();
1010 headers
1011 .insert(
1012 tonic::Status::GRPC_STATUS,
1013 (tonic::Code::Unimplemented as i32).into(),
1014 );
1015 headers
1016 .insert(
1017 http::header::CONTENT_TYPE,
1018 tonic::metadata::GRPC_CONTENT_TYPE,
1019 );
1020 Ok(response)
1021 })
1022 }
1023 }
1024 }
1025 }
1026 impl<T> Clone for MonitorServiceServer<T> {
1027 fn clone(&self) -> Self {
1028 let inner = self.inner.clone();
1029 Self {
1030 inner,
1031 accept_compression_encodings: self.accept_compression_encodings,
1032 send_compression_encodings: self.send_compression_encodings,
1033 max_decoding_message_size: self.max_decoding_message_size,
1034 max_encoding_message_size: self.max_encoding_message_size,
1035 }
1036 }
1037 }
1038 pub const SERVICE_NAME: &str = "monitor_service.MonitorService";
1040 impl<T> tonic::server::NamedService for MonitorServiceServer<T> {
1041 const NAME: &'static str = SERVICE_NAME;
1042 }
1043}