Skip to content

Commit 1ba3e6f

Browse files
committed
log times
1 parent e4a96d0 commit 1ba3e6f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

vortex-tui/src/convert.rs

+14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::path::Path;
22
use std::pin::Pin;
33
use std::task::{Context, Poll};
4+
use std::time::Instant;
45

56
use arrow_array::StructArray as ArrowStructArray;
67
use futures_util::Stream;
@@ -23,6 +24,8 @@ pub async fn exec_convert(input_path: impl AsRef<Path>) -> VortexResult<()> {
2324
input_path.as_ref().display()
2425
);
2526

27+
let wall_start = Instant::now();
28+
2629
let output_path = input_path.as_ref().with_extension("vortex");
2730
let file = File::open(input_path).await?;
2831
let mut reader = ParquetRecordBatchStreamBuilder::new(file).await?.build()?;
@@ -36,6 +39,12 @@ pub async fn exec_convert(input_path: impl AsRef<Path>) -> VortexResult<()> {
3639
}
3740
}
3841

42+
let read_complete = Instant::now();
43+
println!(
44+
"Read Parquet file in {:?}",
45+
read_complete.duration_since(wall_start)
46+
);
47+
3948
let dtype = chunks.first().vortex_expect("empty chunks").dtype().clone();
4049
let chunked_array = ChunkedArray::try_new(chunks, dtype)?;
4150

@@ -55,6 +64,11 @@ pub async fn exec_convert(input_path: impl AsRef<Path>) -> VortexResult<()> {
5564
let output_file = File::create(output_path).await?;
5665
writer.write(output_file, stream).await?;
5766

67+
println!(
68+
"Wrote Vortex in {:?}",
69+
Instant::now().duration_since(read_complete)
70+
);
71+
5872
Ok(())
5973
}
6074

0 commit comments

Comments
 (0)