One I/O operation, as observed by KvikIO. More...
#include <observation.hpp>
Public Member Functions | |
| Duration | duration () const noexcept |
| How long the operation took. More... | |
| double | bytes_per_sec () const noexcept |
| Throughput of this single operation. More... | |
Public Attributes | |
| TimePoint | start {} |
| When the operation started. | |
| TimePoint | end {} |
| When the operation finished. | |
| std::size_t | offset {} |
| Byte offset into the file or remote object. | |
| std::size_t | size {} |
| Number of bytes requested. | |
| std::size_t | bytes_transferred {} |
| std::uint64_t | id {} |
| Identifies this operation, uniquely within the process. | |
| char const * | http_method {nullptr} |
HTTP method, e.g. "GET". Null for local I/O. | |
| std::string_view | source {} |
| ObservationKind | kind {ObservationKind::LOGICAL} |
What layer this describes. Always ObservationKind::LOGICAL today. | |
| IoBackend | backend {IoBackend::POSIX} |
| The backend that carried out the operation. | |
| TransferDirection | direction {TransferDirection::READ} |
| The direction of the operation. | |
| MemoryKind | memory_kind {MemoryKind::HOST} |
| The kind of memory the caller's buffer lives in. | |
| bool | ok {true} |
| False if the operation failed. | |
One I/O operation, as observed by KvikIO.
[start, end) covers the operation from issue to completion.
Definition at line 153 of file observation.hpp.
|
inlinenoexcept |
Throughput of this single operation.
Definition at line 204 of file observation.hpp.
|
inlinenoexcept |
How long the operation took.
end - start, or zero if the span is degenerate. Definition at line 191 of file observation.hpp.
| std::size_t kvikio::Observation::bytes_transferred {} |
Number of bytes actually transferred. Differs from size on a short read, and is zero for an operation that failed.
Definition at line 164 of file observation.hpp.
| std::string_view kvikio::Observation::source {} |
The file path or URL the operation went to. Owned by the handle, and valid only for the duration of the callback. Copy what is needed later.
Definition at line 173 of file observation.hpp.