Log the time incoming RPC messages were queued (#8909)
Release Notes: - N/A Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
parent
bca98caa07
commit
35c516fda9
4 changed files with 47 additions and 27 deletions
|
@ -1,7 +1,7 @@
|
|||
#[macro_export]
|
||||
macro_rules! messages {
|
||||
($(($name:ident, $priority:ident)),* $(,)?) => {
|
||||
pub fn build_typed_envelope(sender_id: ConnectionId, envelope: Envelope) -> Option<Box<dyn AnyTypedEnvelope>> {
|
||||
pub fn build_typed_envelope(sender_id: ConnectionId, received_at: Instant, envelope: Envelope) -> Option<Box<dyn AnyTypedEnvelope>> {
|
||||
match envelope.payload {
|
||||
$(Some(envelope::Payload::$name(payload)) => {
|
||||
Some(Box::new(TypedEnvelope {
|
||||
|
@ -12,6 +12,7 @@ macro_rules! messages {
|
|||
}),
|
||||
message_id: envelope.id,
|
||||
payload,
|
||||
received_at,
|
||||
}))
|
||||
}, )*
|
||||
_ => None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue