pub struct AsyncStreamingProfiler { /* private fields */ }Expand description
Async streaming profiler that accepts AsyncDataSource instead of file paths.
Uses a bounded channel between a blocking CSV reader task and an async processing loop to provide natural backpressure: when the processor falls behind, the reader pauses, which propagates TCP pressure back to the source.
§Architecture
AsyncDataSource ──► [spawn_blocking: csv::Reader] ──► bounded mpsc ──► [processor loop]
SyncIoBridge + csv crate capacity N StreamingColumnCollection
(RFC 4180 compliant) ──► ProfileReportImplementations§
Source§impl AsyncStreamingProfiler
impl AsyncStreamingProfiler
pub fn new() -> AsyncStreamingProfiler
pub fn chunk_size(self, chunk_size: ChunkSize) -> AsyncStreamingProfiler
pub fn sampling(self, strategy: SamplingStrategy) -> AsyncStreamingProfiler
pub fn memory_limit_mb(self, limit: usize) -> AsyncStreamingProfiler
pub fn channel_capacity(self, capacity: usize) -> AsyncStreamingProfiler
pub fn progress( self, sink: ProgressSink, interval: Duration, ) -> AsyncStreamingProfiler
pub fn stop_condition(self, condition: StopCondition) -> AsyncStreamingProfiler
Sourcepub fn analysis_options(
self,
options: AnalysisOptions,
) -> AsyncStreamingProfiler
pub fn analysis_options( self, options: AnalysisOptions, ) -> AsyncStreamingProfiler
Set the whole analysis selection at once.
Preferred over the individual setters: the async pipeline must apply the same selection the synchronous engines do, and passing it as one value is what keeps a new option from reaching only some of them.
pub fn quality_dimensions( self, dims: Vec<QualityDimension>, ) -> AsyncStreamingProfiler
pub fn metric_packs(self, packs: Vec<MetricPack>) -> AsyncStreamingProfiler
Sourcepub fn locale(self, locale: Locale) -> AsyncStreamingProfiler
pub fn locale(self, locale: Locale) -> AsyncStreamingProfiler
Set the locale used to rank detected patterns.
pub fn semantic_hints(self, hints: SemanticHints) -> AsyncStreamingProfiler
Sourcepub fn json_error_policy(
self,
policy: JsonErrorPolicy,
) -> AsyncStreamingProfiler
pub fn json_error_policy( self, policy: JsonErrorPolicy, ) -> AsyncStreamingProfiler
Set how malformed JSON/JSONL records are handled (default: skip and count).
Sourcepub fn csv_flexible(self, flexible: bool) -> AsyncStreamingProfiler
pub fn csv_flexible(self, flexible: bool) -> AsyncStreamingProfiler
Set how CSV records whose field count differs from the header are handled.
true (default) recovers them — extra fields dropped, missing fields
padded to null — and counts every one in
ExecutionMetadata::ragged_row_count, matching the incremental file
path. false rejects the first such record with a CSV parsing error.
Sourcepub fn csv_delimiter(self, delimiter: u8) -> AsyncStreamingProfiler
pub fn csv_delimiter(self, delimiter: u8) -> AsyncStreamingProfiler
Set the CSV field delimiter.
When unset, it is detected from the head of the stream the same way the file path detects it, so a semicolon- or tab-separated source profiles identically over either transport.
Sourcepub async fn analyze_stream(
&self,
source: impl AsyncDataSource,
) -> Result<ProfileReport, DataProfilerError>
pub async fn analyze_stream( &self, source: impl AsyncDataSource, ) -> Result<ProfileReport, DataProfilerError>
Profile data from an async source, returning a ProfileReport.
Supports CSV, JSON, and JSONL formats. Parquet async support is tracked separately.
Trait Implementations§
Source§impl Default for AsyncStreamingProfiler
impl Default for AsyncStreamingProfiler
Source§fn default() -> AsyncStreamingProfiler
fn default() -> AsyncStreamingProfiler
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncStreamingProfiler
impl !UnwindSafe for AsyncStreamingProfiler
impl Freeze for AsyncStreamingProfiler
impl Send for AsyncStreamingProfiler
impl Sync for AsyncStreamingProfiler
impl Unpin for AsyncStreamingProfiler
impl UnsafeUnpin for AsyncStreamingProfiler
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more