Skip to content

Commit 2d52028

Browse files
committed
refactor(cbor_plus_zstd): StreamingTraceWriter renamed CborZstdTraceWriter
1 parent 295a012 commit 2d52028

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

runtime_tracing/src/cbor_zstd_writer.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ pub const HEADERV1: &[u8] = &[
1010
0x01, // Indicates version 1 of the file format
1111
0x00, 0x00]; // Reserved, must be zero in this version.
1212

13-
pub struct StreamingTraceWriter<'a> {
13+
pub struct CborZstdTraceWriter<'a> {
1414
base: AbstractTraceWriterData,
1515

1616
trace_events_path: Option<PathBuf>,
1717
trace_events_file_zstd_encoder: Option<Encoder<'a, File>>,
1818
}
1919

20-
impl<'a> StreamingTraceWriter<'a> {
20+
impl<'a> CborZstdTraceWriter<'a> {
2121
/// Create a new tracer instance for the given program and arguments.
2222
pub fn new(program: &str, args: &[String]) -> Self {
23-
StreamingTraceWriter {
23+
CborZstdTraceWriter {
2424
base: AbstractTraceWriterData::new(program, args),
2525

2626
trace_events_path: None,
@@ -29,7 +29,7 @@ impl<'a> StreamingTraceWriter<'a> {
2929
}
3030
}
3131

32-
impl<'a> AbstractTraceWriter for StreamingTraceWriter<'a> {
32+
impl<'a> AbstractTraceWriter for CborZstdTraceWriter<'a> {
3333
fn get_data(&self) -> &AbstractTraceWriterData {
3434
&self.base
3535
}
@@ -53,7 +53,7 @@ impl<'a> AbstractTraceWriter for StreamingTraceWriter<'a> {
5353
}
5454
}
5555

56-
impl<'a> TraceWriter for StreamingTraceWriter<'a> {
56+
impl<'a> TraceWriter for CborZstdTraceWriter<'a> {
5757
fn begin_writing_trace_events(&mut self, path: &std::path::Path) -> Result<(), Box<dyn std::error::Error>> {
5858
let pb = path.to_path_buf();
5959
self.trace_events_path = Some(pb.clone());

runtime_tracing/src/tracer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn create_trace_writer(program: &str, args: &[String], format: TraceEventsFi
4444
result
4545
}
4646
TraceEventsFileFormat::Binary => {
47-
Box::new(crate::cbor_zstd_writer::StreamingTraceWriter::new(program, args))
47+
Box::new(crate::cbor_zstd_writer::CborZstdTraceWriter::new(program, args))
4848
}
4949
}
5050
}

0 commit comments

Comments
 (0)