hds_console_api/generated/
rs.tokio.console.async_ops.rs

1/// An `AsyncOp` state update.
2///
3/// This includes a list of any new async ops, and updates to the associated statistics
4/// for any async ops that have changed since the last update.
5#[allow(clippy::derive_partial_eq_without_eq)]
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct AsyncOpUpdate {
8    /// A list of new async operations that were created since the last `AsyncOpUpdate`
9    /// was sent. Note that the fact that an async operation has been created
10    /// does not mean that is has been polled or is being polled. This information
11    /// is reflected in the `Stats` of the operation.
12    #[prost(message, repeated, tag = "1")]
13    pub new_async_ops: ::prost::alloc::vec::Vec<AsyncOp>,
14    /// Any async op stats that have changed since the last update.
15    #[prost(map = "uint64, message", tag = "2")]
16    pub stats_update: ::std::collections::HashMap<u64, Stats>,
17    /// A count of how many async op events (e.g. polls, creation, etc) were not
18    /// recorded because the application's event buffer was at capacity.
19    ///
20    /// If everything is working normally, this should be 0. If it is greater
21    /// than 0, that may indicate that some data is missing from this update, and
22    /// it may be necessary to increase the number of events buffered by the
23    /// application to ensure that data loss is avoided.
24    ///
25    /// If the application's instrumentation ensures reliable delivery of events,
26    /// this will always be 0.
27    #[prost(uint64, tag = "3")]
28    pub dropped_events: u64,
29}
30/// An async operation.
31///
32/// An async operation is an operation that is associated with a resource
33/// This could, for example, be a read or write on a TCP stream, or a receive operation on
34/// a channel.
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct AsyncOp {
38    /// The async op's ID.
39    ///
40    /// This uniquely identifies this op across all *currently live*
41    /// ones.
42    #[prost(message, optional, tag = "1")]
43    pub id: ::core::option::Option<super::common::Id>,
44    /// The numeric ID of the op's `Metadata`.
45    ///
46    /// This identifies the `Metadata` that describes the `tracing` span
47    /// corresponding to this async op. The metadata for this ID will have been sent
48    /// in a prior `RegisterMetadata` message.
49    #[prost(message, optional, tag = "2")]
50    pub metadata: ::core::option::Option<super::common::MetaId>,
51    /// The source of this async operation. Most commonly this should be the name
52    /// of the method where the instantiation of this op has happened.
53    #[prost(string, tag = "3")]
54    pub source: ::prost::alloc::string::String,
55    /// The ID of the parent async op.
56    ///
57    /// This field is only set if this async op was created while inside of another
58    /// async op.  For example, `tokio::sync`'s `Mutex::lock` internally calls
59    /// `Semaphore::acquire`.
60    ///
61    /// This field can be empty; if it is empty, this async op is not a child of another
62    /// async op.
63    #[prost(message, optional, tag = "4")]
64    pub parent_async_op_id: ::core::option::Option<super::common::Id>,
65    /// The resources's ID.
66    #[prost(message, optional, tag = "5")]
67    pub resource_id: ::core::option::Option<super::common::Id>,
68}
69/// Statistics associated with a given async operation.
70#[allow(clippy::derive_partial_eq_without_eq)]
71#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct Stats {
73    /// Timestamp of when the async op has been created.
74    #[prost(message, optional, tag = "1")]
75    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
76    /// Timestamp of when the async op was dropped.
77    #[prost(message, optional, tag = "2")]
78    pub dropped_at: ::core::option::Option<::prost_types::Timestamp>,
79    /// The Id of the task that is awaiting on this op.
80    #[prost(message, optional, tag = "4")]
81    pub task_id: ::core::option::Option<super::common::Id>,
82    /// Contains the operation poll stats.
83    #[prost(message, optional, tag = "5")]
84    pub poll_stats: ::core::option::Option<super::common::PollStats>,
85    /// State attributes of the async op.
86    #[prost(message, repeated, tag = "6")]
87    pub attributes: ::prost::alloc::vec::Vec<super::common::Attribute>,
88}