Skip to content
Snippets Groups Projects
Commit f795e2d4 authored by cmd[bot]'s avatar cmd[bot]
Browse files

Update from michalkucharczyk running command 'fmt'

parent ad86690e
Branches
No related merge requests found
Pipeline #514965 waiting for manual action with stages
in 48 minutes and 44 seconds
......@@ -18,12 +18,12 @@
//! Prometheus's metrics for a fork-aware transaction pool.
use super::tx_mem_pool::InsertionInfo;
use crate::{
common::metrics::{GenericMetricsLink, MetricsRegistrant},
graph::{self, BlockHash, ExtrinsicHash},
LOG_TARGET,
};
use super::tx_mem_pool::InsertionInfo;
use futures::{FutureExt, StreamExt};
use prometheus_endpoint::{
exponential_buckets, histogram_opts, linear_buckets, register, Counter, Gauge, Histogram,
......@@ -395,14 +395,13 @@ impl<ChainApi: graph::ChainApi> EventsMetricsCollector<ChainApi> {
// pub fn report_submitted(&self, tx_hash: ExtrinsicHash<ChainApi>, timestamp: Instant) {
pub fn report_submitted(&self, insertion_info: &InsertionInfo<ExtrinsicHash<ChainApi>>) {
self.metrics_message_sink.as_ref().map(|sink| {
if let Err(error) =
sink.unbounded_send(EventMetricsMessage::Submitted(
insertion_info
.source
.timestamp
.expect("timestamp is set in fork-aware pool. qed"),
insertion_info.hash))
{
if let Err(error) = sink.unbounded_send(EventMetricsMessage::Submitted(
insertion_info
.source
.timestamp
.expect("timestamp is set in fork-aware pool. qed"),
insertion_info.hash,
)) {
trace!(target: LOG_TARGET, %error, "tx status metrics message send failed")
}
});
......
......@@ -557,12 +557,13 @@ where
/// Creates a new [`MultiViewListener`] instance along with its associated worker task.
///
/// This function instantiates the new `MultiViewListener` and provides the worker task that relays messages to the
/// external transactions listeners. The task shall be polled by caller.
/// This function instantiates the new `MultiViewListener` and provides the worker task that
/// relays messages to the external transactions listeners. The task shall be polled by caller.
///
/// The `events_metrics_collector` is an instance of `EventsMetricsCollector` that is responsible for collecting and
/// managing metrics related to transaction events. Newly created instance of `MultiViewListener` will report
/// transaction status updates and its timestamps to the given metrics collector.
/// The `events_metrics_collector` is an instance of `EventsMetricsCollector` that is
/// responsible for collecting and managing metrics related to transaction events. Newly
/// created instance of `MultiViewListener` will report transaction status updates and its
/// timestamps to the given metrics collector.
///
/// Returns a tuple containing the [`MultiViewListener`] and the
/// [`MultiViewListenerTask`].
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment