pub struct IngestStats {
pub operation: String,
pub rows: u64,
pub elapsed_ms: u64,
pub bytes_read: u64,
pub bytes_stored: u64,
pub schema_inference_ms: Option<u64>,
pub table: String,
pub file_format: Option<String>,
pub warning: Option<String>,
pub schema_changed: bool,
}Expand description
Telemetry for data ingest operations (load_data, load_file, one-shot ingest).
The to_json() method enriches the base fields with computed throughput:
rows_per_sec, ingest_throughput_mb_sec, and compression_ratio.
Fields§
§operation: String§rows: u64Rows written to the target table by this call.
For replace / append this matches the file row count. For
merge it’s the count returned by the post-DELETE INSERT —
treat as “rows written to target” rather than “rows in input”.
elapsed_ms: u64§bytes_read: u64Raw input size (string length for inline data, file size for file ingest).
bytes_stored: u64On-disk Hyper storage consumed. Zero when not measured.
schema_inference_ms: Option<u64>§table: String§file_format: Option<String>§warning: Option<String>Advisory warning for the LLM (e.g. “use load_file for large inline data”).
schema_changed: booltrue when this ingest changed the target’s column set —
today, only mode = "merge" can flip this on (via auto-
ALTER TABLE ADD COLUMN). Drives whether the server fires a
resource-list-changed notification post-call. Default false
so non-merge paths don’t have to think about it.
Implementations§
Source§impl IngestStats
impl IngestStats
Sourcepub fn rows_per_sec(&self) -> u64
pub fn rows_per_sec(&self) -> u64
Rows ingested per second. Returns rows directly if elapsed is zero
to avoid division by zero.
Sourcepub fn ingest_throughput_mb_sec(&self) -> f64
pub fn ingest_throughput_mb_sec(&self) -> f64
Input data throughput in MB/s (decimal megabytes).
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Ratio of stored bytes to input bytes. Values < 1.0 indicate Hyper’s columnar compression is smaller than the source format.
Trait Implementations§
Source§impl Clone for IngestStats
impl Clone for IngestStats
Source§fn clone(&self) -> IngestStats
fn clone(&self) -> IngestStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IngestStats
impl Debug for IngestStats
Auto Trait Implementations§
impl Freeze for IngestStats
impl RefUnwindSafe for IngestStats
impl Send for IngestStats
impl Sync for IngestStats
impl Unpin for IngestStats
impl UnsafeUnpin for IngestStats
impl UnwindSafe for IngestStats
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request