Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor: Output elapsed time for sql logic test #13718

Merged
merged 6 commits into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading