This commit is contained in:
Dominik Werder
2023-04-25 19:19:23 +02:00
parent 8add1ddc69
commit 773901939d
20 changed files with 718 additions and 147 deletions

View File

@@ -304,6 +304,10 @@ pub struct EventsDynStream {
}
impl EventsDynStream {
pub fn type_name() -> &'static str {
std::any::type_name::<Self>()
}
pub fn new(
scalar_type: ScalarType,
shape: Shape,
@@ -405,7 +409,7 @@ impl Stream for EventsDynStream {
use Poll::*;
loop {
break if self.complete {
panic!("poll_next on complete")
panic!("{} poll_next on complete", Self::type_name())
} else if self.done {
self.complete = true;
Ready(None)

View File

@@ -202,6 +202,10 @@ pub struct FileContentStream {
}
impl FileContentStream {
pub fn type_name() -> &'static str {
std::any::type_name::<Self>()
}
pub fn new(file: File, disk_io_tune: DiskIoTune) -> Self {
Self {
file,
@@ -223,7 +227,7 @@ impl Stream for FileContentStream {
use Poll::*;
loop {
break if self.complete {
panic!("poll_next on complete")
panic!("{} poll_next on complete", Self::type_name())
} else if self.done {
self.complete = true;
Ready(None)
@@ -385,6 +389,10 @@ pub struct FileContentStream2 {
}
impl FileContentStream2 {
pub fn type_name() -> &'static str {
std::any::type_name::<Self>()
}
pub fn new(file: File, disk_io_tune: DiskIoTune) -> Self {
let file = Box::pin(file);
Self {
@@ -412,7 +420,7 @@ impl Stream for FileContentStream2 {
use Poll::*;
loop {
break if self.complete {
panic!("poll_next on complete")
panic!("{} poll_next on complete", Self::type_name())
} else if self.done {
self.complete = true;
Ready(None)

View File

@@ -52,6 +52,10 @@ pub struct EventChunkerMultifile {
}
impl EventChunkerMultifile {
pub fn type_name() -> &'static str {
std::any::type_name::<Self>()
}
pub fn new(
range: NanoRange,
channel_config: SfDbChConf,
@@ -104,7 +108,7 @@ impl Stream for EventChunkerMultifile {
break if let Some(item) = self.log_queue.pop_front() {
Ready(Some(Ok(StreamItem::Log(item))))
} else if self.complete {
panic!("EventChunkerMultifile poll_next on complete");
panic!("{} poll_next on complete", Self::type_name());
} else if self.done_emit_range_final {
self.complete = true;
Ready(None)