Skip to main content

Module analytics

Module analytics 

Source
Expand description

Shared analytics query library.

Extracts SQL, bucketing, and derived-metric logic from CLI commands into a reusable module consumed by both cass analytics * CLI commands and the FrankenTUI analytics dashboards.

§Module structure

  • types — filter, grouping, result structs, error type
  • bucketing — day_id / hour_id ↔ ISO date conversions
  • [derive] — safe derived-metric computation
  • query — SQL query builders against rollup tables
  • validate — rollup invariant checks, drift detection, perf guardrails

Re-exports§

pub use types::AnalyticsError;
pub use types::AnalyticsFilter;
pub use types::AnalyticsResult;
pub use types::BreakdownResult;
pub use types::BreakdownRow;
pub use types::CoverageInfo;
pub use types::DerivedMetrics;
pub use types::Dim;
pub use types::DriftInfo;
pub use types::DriftSignal;
pub use types::GroupBy;
pub use types::Metric;
pub use types::SessionScatterPoint;
pub use types::SourceFilter;
pub use types::StatusResult;
pub use types::TableInfo;
pub use types::TimeseriesResult;
pub use types::ToolReport;
pub use types::ToolRow;
pub use types::UnpricedModel;
pub use types::UnpricedModelsReport;
pub use types::UsageBucket;
pub use validate::ValidateConfig;
pub use validate::ValidationReport;

Modules§

bucketing
Time-bucket conversions for analytics.
derive
Derived metric computation for analytics buckets.
query
SQL query builders for analytics.
types
Shared types for the analytics library.
validate
Analytics validation library.