Skip to content

Commit

Permalink
Minor: Output elapsed time for sql logic test (#13718)
Browse files Browse the repository at this point in the history
* Minor: Output elapsed time for sql logic test
  • Loading branch information
comphead authored Dec 10, 2024
1 parent becd0c9 commit 62fc4db
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions datafusion/sqllogictest/bin/sqllogictests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@
// specific language governing permissions and limitations
// under the License.

use std::ffi::OsStr;
use std::fs;
use std::path::{Path, PathBuf};

use clap::Parser;
use datafusion_common::utils::get_available_parallelism;
use datafusion_sqllogictest::{DataFusion, TestContext};
use futures::stream::StreamExt;
use itertools::Itertools;
use log::info;
use sqllogictest::strict_column_validator;
use std::ffi::OsStr;
use std::fs;
use std::path::{Path, PathBuf};

use datafusion_common::{exec_datafusion_err, exec_err, DataFusionError, Result};
use datafusion_common_runtime::SpawnedTask;
Expand Down Expand Up @@ -100,14 +99,16 @@ async fn run_tests() -> Result<()> {
let errors: Vec<_> = futures::stream::iter(read_test_files(&options)?)
.map(|test_file| {
SpawnedTask::spawn(async move {
println!("Running {:?}", test_file.relative_path);
let file_path = test_file.relative_path.clone();
let start = datafusion::common::instant::Instant::now();
if options.complete {
run_complete_file(test_file).await?;
} else if options.postgres_runner {
run_test_file_with_postgres(test_file).await?;
} else {
run_test_file(test_file).await?;
}
println!("Executed {:?}. Took {:?}", file_path, start.elapsed());
Ok(()) as Result<()>
})
.join()
Expand Down

0 comments on commit 62fc4db

Please sign in to comment.