-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(s2n-quic-dc): emit basic stream events
- Loading branch information
Showing
13 changed files
with
3,662 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,205 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#[event("application:write")] | ||
pub struct ApplicationWrite { | ||
#[event("stream:write_flushed")] | ||
pub struct StreamWriteFlushed { | ||
/// The number of bytes that the application tried to write | ||
#[measure("provided", Bytes)] | ||
total_len: usize, | ||
provided_len: usize, | ||
|
||
/// The amount that was written | ||
#[measure("committed", Bytes)] | ||
#[counter("committed.total", Bytes)] | ||
write_len: usize, | ||
committed_len: usize, | ||
|
||
#[bool_counter("is_fin")] | ||
is_fin: bool, | ||
|
||
/// The amount of time it took to process the write request | ||
/// | ||
/// Note that this includes both any syscall and encryption overhead | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
} | ||
|
||
#[event("stream:write_blocked")] | ||
pub struct StreamWriteBlocked { | ||
/// The number of bytes that the application tried to write | ||
#[measure("provided", Bytes)] | ||
provided_len: usize, | ||
|
||
#[bool_counter("is_fin")] | ||
is_fin: bool, | ||
|
||
/// The amount of time it took to process the write request | ||
/// | ||
/// Note that this includes both any syscall and encryption overhead | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
} | ||
|
||
#[event("application:read")] | ||
pub struct ApplicationRead { | ||
#[event("stream:write_errored")] | ||
pub struct StreamWriteErrored { | ||
/// The number of bytes that the application tried to write | ||
#[measure("provided", Bytes)] | ||
provided_len: usize, | ||
|
||
#[bool_counter("is_fin")] | ||
is_fin: bool, | ||
|
||
/// The amount of time it took to process the write request | ||
/// | ||
/// Note that this includes both any syscall and encryption overhead | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
|
||
/// The system `errno` from the returned error | ||
errno: Option<i32>, | ||
} | ||
|
||
#[event("stream:write_shutdown")] | ||
pub struct StreamWriteShutdown { | ||
/// The number of bytes in the send buffer at the time of shutdown | ||
#[measure("buffer_len", Bytes)] | ||
buffer_len: usize, | ||
|
||
/// If the stream required a background task to drive the stream shutdown | ||
#[bool_counter("background")] | ||
background: bool, | ||
} | ||
|
||
#[event("stream:write_socket_flushed")] | ||
pub struct StreamWriteSocketFlushed { | ||
/// The number of bytes that the application tried to write | ||
#[measure("provided", Bytes)] | ||
provided_len: usize, | ||
|
||
/// The amount that was written | ||
#[measure("committed", Bytes)] | ||
#[counter("committed.total", Bytes)] | ||
committed_len: usize, | ||
|
||
/// The amount of time it took to process the write request | ||
/// | ||
/// Note that this includes both any syscall and encryption overhead | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
} | ||
|
||
#[event("stream:write_socket_blocked")] | ||
pub struct StreamWriteSocketBlocked { | ||
/// The number of bytes that the application tried to write | ||
#[measure("provided", Bytes)] | ||
provided_len: usize, | ||
|
||
/// The amount of time it took to process the write request | ||
/// | ||
/// Note that this includes both any syscall and encryption overhead | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
} | ||
|
||
#[event("stream:write_socket_errored")] | ||
pub struct StreamWriteSocketErrored { | ||
/// The number of bytes that the application tried to write | ||
#[measure("provided", Bytes)] | ||
provided_len: usize, | ||
|
||
/// The amount of time it took to process the write request | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
|
||
/// The system `errno` from the returned error | ||
errno: Option<i32>, | ||
} | ||
|
||
#[event("stream:read_flushed")] | ||
pub struct StreamReadFlushed { | ||
/// The number of bytes that the application tried to read | ||
#[measure("capacity", Bytes)] | ||
capacity: usize, | ||
|
||
/// The amount that was read | ||
#[measure("committed", Bytes)] | ||
#[counter("committed.total", Bytes)] | ||
read_len: usize, | ||
committed_len: usize, | ||
|
||
/// The amount of time it took to process the read request | ||
/// | ||
/// Note that this includes both any syscall and decryption overhead | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
} | ||
|
||
#[event("stream:read_blocked")] | ||
pub struct StreamReadBlocked { | ||
/// The number of bytes that the application tried to read | ||
#[measure("capacity", Bytes)] | ||
capacity: usize, | ||
|
||
/// The amount of time it took to process the read request | ||
/// | ||
/// Note that this includes both any syscall and decryption overhead | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
} | ||
|
||
#[event("stream:read_errored")] | ||
pub struct StreamReadErrored { | ||
/// The number of bytes that the application tried to read | ||
#[measure("capacity", Bytes)] | ||
capacity: usize, | ||
|
||
/// The amount of time it took to process the read request | ||
/// | ||
/// Note that this includes both any syscall and decryption overhead | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
|
||
/// The system `errno` from the returned error | ||
errno: Option<i32>, | ||
} | ||
|
||
#[event("stream:read_shutdown")] | ||
pub struct StreamReadShutdown { | ||
/// If the stream required a background task to drive the stream shutdown | ||
#[bool_counter("background")] | ||
background: bool, | ||
} | ||
|
||
#[event("stream:read_socket_flushed")] | ||
pub struct StreamReadSocketFlushed { | ||
#[measure("capacity", Bytes)] | ||
capacity: usize, | ||
|
||
#[measure("committed", Bytes)] | ||
#[counter("committed.total", Bytes)] | ||
committed_len: usize, | ||
|
||
/// The amount of time it took to process the read request | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
} | ||
|
||
#[event("stream:read_socket_blocked")] | ||
pub struct StreamReadSocketBlocked { | ||
#[measure("capacity", Bytes)] | ||
capacity: usize, | ||
|
||
/// The amount of time it took to process the read request | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
} | ||
|
||
#[event("stream:read_socket_errored")] | ||
pub struct StreamReadSocketErrored { | ||
#[measure("capacity", Bytes)] | ||
capacity: usize, | ||
|
||
/// The amount of time it took to process the read request | ||
#[measure("processing_duration", Duration)] | ||
processing_duration: core::time::Duration, | ||
|
||
/// The system `errno` from the returned error | ||
errno: Option<i32>, | ||
} |
Oops, something went wrong.