Use tracing::span

This commit is contained in:
Dominik Werder
2021-04-22 08:47:09 +02:00
parent 4566892640
commit caf91b460e
3 changed files with 55 additions and 33 deletions

View File

@@ -140,7 +140,7 @@ impl Stream for BinnedBytesForHttpStream {
#[derive(Clone, Debug)]
pub struct PreBinnedQuery {
patch: PreBinnedPatchCoord,
pub patch: PreBinnedPatchCoord,
agg_kind: AggKind,
channel: Channel,
}

View File

@@ -49,7 +49,7 @@ pub async fn x_processed_stream_from_node(
netout.forget();
debug!("x_processed_stream_from_node WRITTEN");
let frames = InMemoryFrameAsyncReadStream::new(netin);
let s2 = MinMaxAvgScalarEventBatchStreamFromFrames { inp: frames };
let s2 = MinMaxAvgScalarEventBatchStreamFromFrames::new(frames);
debug!("x_processed_stream_from_node HAVE STREAM INSTANCE");
let s3: Pin<Box<dyn Stream<Item = Result<_, Error>> + Send>> = Box::pin(s2);
debug!("x_processed_stream_from_node RETURN");
@@ -63,6 +63,15 @@ where
inp: InMemoryFrameAsyncReadStream<T>,
}
impl<T> MinMaxAvgScalarEventBatchStreamFromFrames<T>
where
T: AsyncRead + Unpin,
{
pub fn new(inp: InMemoryFrameAsyncReadStream<T>) -> Self {
Self { inp }
}
}
impl<T> Stream for MinMaxAvgScalarEventBatchStreamFromFrames<T>
where
T: AsyncRead + Unpin,