Skip to content

Commit

Permalink
Added completed in xx time message
Browse files Browse the repository at this point in the history
  • Loading branch information
Omega359 committed Dec 15, 2024
1 parent 32621c6 commit f4fb261
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions datafusion/sqllogictest/bin/sqllogictests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ use std::future::Future;
use std::path::{Path, PathBuf};
#[cfg(feature = "postgres")]
use std::{env, thread};

use std::time::Instant;
use clap::Parser;
use datafusion_common::utils::get_available_parallelism;
use datafusion_common::{exec_datafusion_err, exec_err, DataFusionError, Result};
use datafusion_common_runtime::SpawnedTask;
use datafusion_sqllogictest::{DataFusion, TestContext};
use futures::stream::StreamExt;
use indicatif::{MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle};
use indicatif::{HumanDuration, MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle};
use itertools::Itertools;
use log::Level::{Info, Warn};
use log::{info, log_enabled, warn};
Expand Down Expand Up @@ -201,6 +201,8 @@ async fn run_tests() -> Result<()> {
.unwrap()
.progress_chars("##-");

let start = Instant::now();

let errors: Vec<_> = futures::stream::iter(read_test_files(&options)?)
.map(|test_file| {
let validator = if options.include_sqlite
Expand Down Expand Up @@ -265,7 +267,7 @@ async fn run_tests() -> Result<()> {
.collect()
.await;

m.println("Completed")?;
m.println(format!("Completed in {}", HumanDuration(start.elapsed())))?;

#[cfg(feature = "postgres")]
if options.postgres_runner {
Expand Down

0 comments on commit f4fb261

Please sign in to comment.