Skip to content

Commit 3f1411c

Browse files
committed
clean up
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent e761350 commit 3f1411c

8 files changed

Lines changed: 591 additions & 143 deletions

File tree

benchmarks/compress-bench/src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,19 @@ struct Args {
7070
output_path: Option<PathBuf>,
7171
#[arg(long)]
7272
tracing: bool,
73+
/// Format for the primary stderr log sink. `text` is the default human-readable format;
74+
/// `json` emits one JSON object per event, suitable for piping into `jq`.
75+
///
76+
/// See [`LogFormat`] for the full details.
77+
#[arg(long, value_enum, default_value_t = LogFormat::Text)]
78+
log_format: LogFormat,
7379
}
7480

7581
#[tokio::main]
7682
async fn main() -> anyhow::Result<()> {
7783
let args = Args::parse();
7884

79-
setup_logging_and_tracing(args.verbose, args.tracing, LogFormat::Text)?;
85+
setup_logging_and_tracing(args.verbose, args.tracing, args.log_format)?;
8086

8187
run_compress(
8288
args.iterations,

vortex-bench/src/bin/data-gen.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ struct Args {
3838
#[arg(long)]
3939
tracing: bool,
4040

41-
/// Format for the primary stderr log sink. `text` is the default human
42-
/// readable format; `json` emits newline-delimited JSON suitable for `jq`.
41+
/// Format for the primary stderr log sink. `text` is the default
42+
/// human-readable format; `json` emits one JSON object per event, suitable
43+
/// for piping into `jq`. See [`LogFormat`] for the full details.
4344
#[arg(long, value_enum, default_value_t = LogFormat::Text)]
4445
log_format: LogFormat,
4546

vortex-btrblocks/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ num-traits = { workspace = true }
2020
pco = { workspace = true, optional = true }
2121
rand = { workspace = true }
2222
rustc-hash = { workspace = true }
23-
tracing = { workspace = true, features = ["std", "attributes"] }
23+
tracing = { workspace = true }
2424
vortex-alp = { workspace = true }
2525
vortex-array = { workspace = true }
2626
vortex-buffer = { workspace = true }

vortex-btrblocks/src/canonical_compressor.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,9 @@ pub struct BtrBlocksCompressor(
3939
impl BtrBlocksCompressor {
4040
/// Compresses an array using BtrBlocks-inspired compression.
4141
///
42-
/// This call is instrumented with a `vortex_compressor::cascade` span named
43-
/// `BtrBlocksCompressor::compress` so that downstream tracing consumers
44-
/// (e.g. `tracing-perfetto`) have a distinct entry frame to pivot on, nested
45-
/// above the generic [`CascadingCompressor::compress`] span that actually
46-
/// runs the pipeline. See the `Observability` section of the
47-
/// [`vortex_compressor`] crate docs for the full tracing reference.
48-
#[tracing::instrument(
49-
target = "vortex_compressor::cascade",
50-
name = "BtrBlocksCompressor::compress",
51-
level = "trace",
52-
skip_all,
53-
fields(
54-
len = array.len(),
55-
nbytes = array.nbytes(),
56-
dtype = %array.dtype(),
57-
),
58-
)]
42+
/// This is a thin delegate to [`CascadingCompressor::compress`], which owns the tracing
43+
/// instrumentation. See the `Observability` section of the [`vortex_compressor`] crate
44+
/// docs for the full tracing reference.
5945
pub fn compress(&self, array: &ArrayRef) -> VortexResult<ArrayRef> {
6046
self.0.compress(array)
6147
}

vortex-btrblocks/src/lib.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,10 @@
5454
//!
5555
//! # Observability
5656
//!
57-
//! [`BtrBlocksCompressor`] participates in the [`vortex_compressor`] tracing target system.
58-
//! See the [`vortex_compressor` crate docs](vortex_compressor#observability) for the full
59-
//! reference on targets, spans, and events.
60-
//!
61-
//! The top-level [`BtrBlocksCompressor::compress`] call adds its own
62-
//! `vortex_compressor::cascade` span (named `BtrBlocksCompressor::compress`) that nests
63-
//! above the generic cascading-compressor pipeline, giving downstream trace consumers a
64-
//! distinct entry frame.
57+
//! [`BtrBlocksCompressor`] is a thin delegate to [`CascadingCompressor`], which owns all
58+
//! tracing instrumentation. See the
59+
//! [`vortex_compressor` crate docs](vortex_compressor#observability) for the full reference
60+
//! on targets, spans, and events.
6561
//!
6662
//! Quick start — one line per leaf with scheme, estimated ratio, actual ratio, accepted?:
6763
//!

0 commit comments

Comments
 (0)