Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
a218a1fe
Unverified
Commit
a218a1fe
authored
Mar 27, 2021
by
asynchronous rob
Committed by
GitHub
Mar 27, 2021
Browse files
use a gauge for approval lag (#2725)
parent
be096891
Pipeline
#130938
canceled with stages
in 5 minutes and 45 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
node/service/src/grandpa_support.rs
View file @
a218a1fe
...
...
@@ -42,7 +42,7 @@ use {
#[cfg(feature
=
"real-overseer"
)]
#[derive(Clone)]
pub
(
crate
)
struct
ApprovalCheckingDiagnostic
{
checking_lag
:
Option
<
prometheus_endpoint
::
Histogram
>
,
checking_lag
:
Option
<
prometheus_endpoint
::
Gauge
<
prometheus_endpoint
::
U64
>
>
,
overseer
:
OverseerHandler
,
}
...
...
@@ -55,11 +55,11 @@ impl ApprovalCheckingDiagnostic {
Ok
(
ApprovalCheckingDiagnostic
{
checking_lag
:
if
let
Some
(
registry
)
=
registry
{
Some
(
prometheus_endpoint
::
register
(
prometheus_endpoint
::
Histogram
::
with_opts
(
prometheus_endpoint
::
Histogram
Opts
::
new
(
prometheus_endpoint
::
Gauge
::
with_opts
(
prometheus_endpoint
::
Opts
::
new
(
"parachain_approval_checking_finality_lag"
,
"How far behind the head of the chain the Approval Checking protocol wants to vote"
,
)
.buckets
(
vec!
[
1.0
,
2.0
,
3.0
,
4.0
,
5.0
,
10.0
,
20.0
,
30.0
,
40.0
,
50.0
])
)
)
?
,
registry
,
)
?
)
...
...
@@ -154,7 +154,7 @@ impl<B> grandpa::VotingRule<PolkadotBlock, B> for ApprovalCheckingDiagnostic
);
if
let
Some
(
ref
checking_lag
)
=
checking_lag
{
checking_lag
.
observe
(
approval_checking_subsystem_lag
as
_
);
checking_lag
.
set
(
approval_checking_subsystem_lag
as
_
);
}
tracing
::
debug!
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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