Skip to content

Commit

Permalink
update benchmark code
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Dec 17, 2024
1 parent 0c85460 commit a317fc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/user-guide/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Set `spark.comet.metrics.detailed=true` to see all available Comet metrics.
Comet adds some additional metrics:

| Metric | Description |
| ------------------------------- | ----------------------------------------------------------------------------------------- |
| `ipc time` | Time to encode batches in IPC format |
| ------------------------------- |-------------------------------------------------------------------------------------------|
| `ipc time` | Time to encode batches in IPC format. Includes compression time. |
| `native shuffle time` | Total time spent in native shuffle writer, excluding the execution time of the input plan |
| `native shuffle input time` | Time spend executing the shuffle input plan and fetching batches. |
| `shuffle wall time (inclusive)` | Total time executing the shuffle write, inclusive of executing the input plan. |
Expand Down
4 changes: 4 additions & 0 deletions native/core/benches/row_columnar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use comet::execution::shuffle::row::{
process_sorted_row_partition, SparkUnsafeObject, SparkUnsafeRow,
};
use criterion::{criterion_group, criterion_main, Criterion};
use datafusion::physical_plan::metrics::Time;
use tempfile::Builder;

const NUM_ROWS: usize = 10000;
Expand Down Expand Up @@ -63,6 +64,8 @@ fn benchmark(c: &mut Criterion) {
let row_size_ptr = row_sizes.as_mut_ptr();
let schema = vec![ArrowDataType::Int64; NUM_COLS];

let ipc_time = Time::default();

b.iter(|| {
let tempfile = Builder::new().tempfile().unwrap();

Expand All @@ -77,6 +80,7 @@ fn benchmark(c: &mut Criterion) {
false,
0,
None,
&ipc_time,
)
.unwrap();
});
Expand Down

0 comments on commit a317fc5

Please sign in to comment.