Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Chiguireitor
addrindexrs
Commits
f9ad0938
Unverified
Commit
f9ad0938
authored
Jun 14, 2018
by
Roman Zeyde
Browse files
Rename histogram() -> histogram_vec()
parent
0afde683
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
src/daemon.rs
src/daemon.rs
+2
-2
src/index.rs
src/index.rs
+1
-1
src/mempool.rs
src/mempool.rs
+1
-1
src/metrics.rs
src/metrics.rs
+1
-1
src/rpc.rs
src/rpc.rs
+1
-1
No files found.
src/daemon.rs
View file @
f9ad0938
...
...
@@ -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"
],
),
...
...
src/index.rs
View file @
f9ad0938
...
...
@@ -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"
],
),
...
...
src/mempool.rs
View file @
f9ad0938
...
...
@@ -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"
],
),
...
...
src/metrics.rs
View file @
f9ad0938
...
...
@@ -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
...
...
src/rpc.rs
View file @
f9ad0938
...
...
@@ -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"
],
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment