INNER CODE UNIT · Rust

calculate_progress

lanterndata/lantern · lantern_cli/src/embeddings/mod.rs:86

fn calculate_progress(total: i64, processed: usize) -> u8 {
    if total <= 0 {
        return 0;
    }

    return ((processed as f64 / total as f64) * 100.0) as u8;
}

async fn estimate_count(
    client: &mut Client,
    full_table_name: &str,
    filter_sql: &str,
    limit_sql: &str,
    logger: Arc<Logger>,
) -> Result<i64, anyhow::Error> {
    let transaction = client.transaction().await?;

    let rows = transaction

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…