Telemetry per node (#7463)

This commit is contained in:
Cecile Tonglet authored and GitHub committed 2021-01-20 12:28:56 +01:00
1 parent 71ef82afbc
commit 970cc25cef
49 files changed
+2577 -2008

No files matched your search

@@ -22,7 +22,6 @@
use libp2p::{core::ConnectedPoint, Multiaddr};
use serde::{Deserialize, Serialize};
use slog_derive::SerdeValue;
use std::{collections::{HashMap, HashSet}, time::Duration};
/// Returns general information about the networking.
@@ -30,7 +29,7 @@ use std::{collections::{HashMap, HashSet}, time::Duration};
/// Meant for general diagnostic purposes.
///
/// **Warning**: This API is not stable.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerdeValue)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NetworkState {
/// PeerId of the local node.
@@ -52,8 +52,9 @@ use libp2p::{
};
use std::{
borrow::Cow, collections::{hash_map::Entry, HashMap}, convert::TryFrom as _, io, iter,
pin::Pin, task::{Context, Poll}, time::{Duration, Instant},
pin::Pin, task::{Context, Poll}, time::Duration,
};
use wasm_timer::Instant;
pub use libp2p::request_response::{InboundFailure, OutboundFailure, RequestId};