Fix tests
This commit is contained in:
@@ -830,7 +830,7 @@ impl TimeBinnerTy for ChannelEventsTimeBinner {
|
||||
type Output = Box<dyn TimeBinned>;
|
||||
|
||||
fn ingest(&mut self, item: &mut Self::Input) {
|
||||
info!("{} INGEST", Self::type_name());
|
||||
trace!("{} INGEST", Self::type_name());
|
||||
match item {
|
||||
ChannelEvents::Events(item) => {
|
||||
if self.binner.is_none() {
|
||||
|
||||
@@ -71,6 +71,10 @@ pub struct EventsDim0<STY> {
|
||||
}
|
||||
|
||||
impl<STY> EventsDim0<STY> {
|
||||
pub fn type_name() -> &'static str {
|
||||
std::any::type_name::<Self>()
|
||||
}
|
||||
|
||||
pub fn push_front(&mut self, ts: u64, pulse: u64, value: STY) {
|
||||
self.tss.push_front(ts);
|
||||
self.pulses.push_front(pulse);
|
||||
@@ -740,8 +744,9 @@ impl<STY> TypeName for EventsDim0<STY> {
|
||||
|
||||
impl<STY: ScalarOps> EventsNonObj for EventsDim0<STY> {
|
||||
fn into_tss_pulses(self: Box<Self>) -> (VecDeque<u64>, VecDeque<u64>) {
|
||||
info!(
|
||||
"EventsDim0::into_tss_pulses len {} len {}",
|
||||
trace!(
|
||||
"{}::into_tss_pulses len {} len {}",
|
||||
Self::type_name(),
|
||||
self.tss.len(),
|
||||
self.pulses.len()
|
||||
);
|
||||
@@ -985,19 +990,19 @@ impl<STY: ScalarOps> TimeBinner for EventsDim0TimeBinner<STY> {
|
||||
// That needs modified interfaces which can take and yield the start and latest index.
|
||||
loop {
|
||||
while item.starts_after(self.agg.range()) {
|
||||
trace_ingest_item!("{self_name} IGNORE ITEM AND CYCLE BECAUSE item.starts_after");
|
||||
trace_ingest_item!("{self_name} ignore item and cycle starts_after");
|
||||
self.cycle();
|
||||
if self.rng.is_none() {
|
||||
warn!("{self_name} no more bin in edges B");
|
||||
debug!("{self_name} no more bin in edges after starts_after");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if item.ends_before(self.agg.range()) {
|
||||
trace_ingest_item!("{self_name} IGNORE ITEM BECAUSE ends_before");
|
||||
trace_ingest_item!("{self_name} ignore item ends_before");
|
||||
return;
|
||||
} else {
|
||||
if self.rng.is_none() {
|
||||
trace_ingest_item!("{self_name} no more bin in edges D");
|
||||
trace_ingest_item!("{self_name} no more bin in edges");
|
||||
return;
|
||||
} else {
|
||||
if let Some(item) = item
|
||||
@@ -1012,13 +1017,13 @@ impl<STY: ScalarOps> TimeBinner for EventsDim0TimeBinner<STY> {
|
||||
trace_ingest_item!("{self_name} FED ITEM, ENDS AFTER agg-range {:?}", self.agg.range());
|
||||
self.cycle();
|
||||
if self.rng.is_none() {
|
||||
warn!("{self_name} no more bin in edges C");
|
||||
warn!("{self_name} no more bin in edges after ingest and cycle");
|
||||
return;
|
||||
} else {
|
||||
trace_ingest_item!("{self_name} FED ITEM, CYCLED, CONTINUE.");
|
||||
trace_ingest_item!("{self_name} item fed, cycled, continue");
|
||||
}
|
||||
} else {
|
||||
trace_ingest_item!("{self_name} FED ITEM.");
|
||||
trace_ingest_item!("{self_name} item fed, break");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -847,7 +847,7 @@ where
|
||||
}
|
||||
|
||||
fn ingest(&mut self, item: &Self::Input) {
|
||||
debug!("{} ingest", Self::type_name());
|
||||
trace!("{} ingest", Self::type_name());
|
||||
if self.do_time_weight {
|
||||
self.ingest_time_weight(item)
|
||||
} else {
|
||||
|
||||
@@ -27,20 +27,20 @@ const DO_DETECT_NON_MONO: bool = true;
|
||||
|
||||
#[allow(unused)]
|
||||
macro_rules! trace2 {
|
||||
($($arg:tt)*) => ();
|
||||
($($arg:tt)*) => (trace!($($arg)*));
|
||||
($($arg:tt)*) => {};
|
||||
($($arg:tt)*) => { trace!($($arg)*) };
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
macro_rules! trace3 {
|
||||
($($arg:tt)*) => ();
|
||||
($($arg:tt)*) => (trace!($($arg)*));
|
||||
($($arg:tt)*) => {};
|
||||
($($arg:tt)*) => { trace!($($arg)*) };
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
macro_rules! trace4 {
|
||||
($($arg:tt)*) => ();
|
||||
($($arg:tt)*) => (trace!($($arg)*));
|
||||
($($arg:tt)*) => {};
|
||||
($($arg:tt)*) => { trace!($($arg)*) };
|
||||
}
|
||||
|
||||
pub trait Mergeable<Rhs = Self>: fmt::Debug + WithLen + ByteEstimate + Unpin {
|
||||
@@ -296,7 +296,7 @@ where
|
||||
}
|
||||
RangeCompletableItem::RangeComplete => {
|
||||
self.range_complete[i] = true;
|
||||
debug!("Merger range_complete {:?}", self.range_complete);
|
||||
trace!("range_complete {:?}", self.range_complete);
|
||||
continue;
|
||||
}
|
||||
},
|
||||
@@ -362,7 +362,7 @@ where
|
||||
if let Some(o) = self.out.as_ref() {
|
||||
if o.len() >= self.out_max_len || o.byte_estimate() >= OUT_MAX_BYTES || self.do_clear_out || last_emit {
|
||||
if o.len() > self.out_max_len {
|
||||
info!("MERGER OVERWEIGHT ITEM {} vs {}", o.len(), self.out_max_len);
|
||||
debug!("MERGER OVERWEIGHT ITEM {} vs {}", o.len(), self.out_max_len);
|
||||
}
|
||||
trace3!("decide to output");
|
||||
self.do_clear_out = false;
|
||||
@@ -437,7 +437,7 @@ where
|
||||
}
|
||||
} else if let Some(item) = self.out_of_band_queue.pop_front() {
|
||||
let item = on_sitemty_data!(item, |k: T| {
|
||||
info!("++++++++++++ EMIT OUT OF BAND DATA len {}", k.len());
|
||||
trace3!("emit out-of-band data len {}", k.len());
|
||||
sitem_data(k)
|
||||
});
|
||||
trace!("emit out-of-band");
|
||||
|
||||
Reference in New Issue
Block a user