Unverified Commit f9ad0938 authored by Roman Zeyde's avatar Roman Zeyde
Browse files

Rename histogram() -> histogram_vec()

parent 0afde683
......@@ -187,11 +187,11 @@ impl Daemon {
SocketAddr::from_str(addr).unwrap(),
base64::encode(&read_cookie(network)?),
)?),
latency: metrics.histogram(
latency: metrics.histogram_vec(
HistogramOpts::new("daemon_rpc", "Bitcoind RPC latency (in seconds)"),
&["method"],
),
size: metrics.histogram(
size: metrics.histogram_vec(
HistogramOpts::new("daemon_bytes", "Bitcoind RPC size (in bytes)"),
&["method", "dir"],
),
......
......@@ -263,7 +263,7 @@ impl Stats {
"index_height",
"Last indexed block's height",
)),
duration: metrics.histogram(
duration: metrics.histogram_vec(
HistogramOpts::new("index_duration", "indexing duration (in seconds)"),
&["step"],
),
......
......@@ -130,7 +130,7 @@ impl Tracker {
"mempool_txs_vsize",
"vsize of mempool transactions (in bytes)",
)),
update: metrics.histogram(
update: metrics.histogram_vec(
HistogramOpts::new("mempool_update", "Time to update mempool (in seconds)"),
&["step"],
),
......
......@@ -33,7 +33,7 @@ impl Metrics {
g
}
pub fn histogram(&self, opts: prometheus::HistogramOpts, labels: &[&str]) -> HistogramVec {
pub fn histogram_vec(&self, opts: prometheus::HistogramOpts, labels: &[&str]) -> HistogramVec {
let h = HistogramVec::new(opts, labels).unwrap();
self.reg.register(Box::new(h.clone())).unwrap();
h
......
......@@ -405,7 +405,7 @@ impl RPC {
pub fn start(addr: SocketAddr, query: Arc<Query>, metrics: &Metrics) -> RPC {
let stats = Arc::new(Stats {
latency: metrics.histogram(
latency: metrics.histogram_vec(
HistogramOpts::new("electrum_rpc", "Electrum RPC latency (seconds)"),
&["method"],
),
......
Markdown is supported
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