#[non_exhaustive]pub struct FindingPolicy { /* private fields */ }Expand description
The thresholds findings apply.
Separate from the profiler’s configuration on purpose: findings interpret a finished report, including one read back from disk that no profiler configuration accompanies.
Implementations§
Source§impl FindingPolicy
impl FindingPolicy
Sourcepub fn null_heavy_percentage(self, percentage: f64) -> Self
pub fn null_heavy_percentage(self, percentage: f64) -> Self
Report a column as null_heavy when its null percentage, at the
report’s 2dp precision, is at least percentage. The threshold is
applied at 2dp too, so the evidence states exactly what was compared.
Sourcepub fn mixed_types_percentage(self, percentage: f64) -> Self
pub fn mixed_types_percentage(self, percentage: f64) -> Self
Report a column as mixed_types when the values outside its dominant
lexical type make up at least percentage of those classified, both
at 2dp.
Sourcepub fn validate(&self) -> Result<(), FindingPolicyError>
pub fn validate(&self) -> Result<(), FindingPolicyError>
Check that every threshold can be applied, without needing a report.
Sourcepub fn evaluate(
&self,
report: &ProfileReport,
) -> Result<FindingsResult, FindingPolicyError>
pub fn evaluate( &self, report: &ProfileReport, ) -> Result<FindingsResult, FindingPolicyError>
Derive the findings a report supports.
The report is not modified and nothing is printed.
Sourcepub fn evaluate_input(
&self,
input: &FindingsInput,
) -> Result<FindingsResult, FindingPolicyError>
pub fn evaluate_input( &self, input: &FindingsInput, ) -> Result<FindingsResult, FindingPolicyError>
evaluate over the facts of a report, for a report
a binding holds no ProfileReport for.