mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-13 01:01:02 +00:00
Node Uptime (#196)
* fix: node stats updating live * fix: Propagation time for first node to hit a block * chore: Leaner feed serialization * fix: Handle old nodes with stringified network_state * feat: Add Node Uptime to the list * chore: Remove old backend from test pipeline
This commit is contained in:
@@ -9,8 +9,11 @@ pub struct MeanList<T> where T: Float + AddAssign + Zero + From<u8> {
|
||||
ticks_per_mean: u8,
|
||||
}
|
||||
|
||||
impl<T> MeanList<T> where T: Float + AddAssign + Zero + From<u8> {
|
||||
pub fn new() -> MeanList<T> {
|
||||
impl<T> Default for MeanList<T>
|
||||
where
|
||||
T: Float + AddAssign + Zero + From<u8>,
|
||||
{
|
||||
fn default() -> MeanList<T> {
|
||||
MeanList {
|
||||
period_sum: T::zero(),
|
||||
period_count: 0,
|
||||
@@ -19,7 +22,9 @@ impl<T> MeanList<T> where T: Float + AddAssign + Zero + From<u8> {
|
||||
ticks_per_mean: 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> MeanList<T> where T: Float + AddAssign + Zero + From<u8> {
|
||||
pub fn slice(&self) -> &[T] {
|
||||
&self.means[..usize::from(self.mean_index)]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user