Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
a200d4c9
Commit
a200d4c9
authored
1 year ago
by
Andrei Sandu
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
uncompressed pov metrics (#7524)
Signed-off-by:
Andrei Sandu
<
andrei-mihail@parity.io
>
parent
86f3f640
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
polkadot/node/core/candidate-validation/src/lib.rs
+2
-1
2 additions, 1 deletion
polkadot/node/core/candidate-validation/src/lib.rs
polkadot/node/core/candidate-validation/src/metrics.rs
+9
-5
9 additions, 5 deletions
polkadot/node/core/candidate-validation/src/metrics.rs
with
11 additions
and
6 deletions
polkadot/node/core/candidate-validation/src/lib.rs
+
2
−
1
View file @
a200d4c9
...
...
@@ -590,6 +590,7 @@ where
};
metrics
.observe_code_size
(
raw_validation_code
.len
());
metrics
.observe_pov_size
(
pov
.block_data
.0
.len
(),
true
);
let
raw_block_data
=
match
sp_maybe_compressed_blob
::
decompress
(
&
pov
.block_data
.0
,
POV_BOMB_LIMIT
)
{
Ok
(
block_data
)
=>
BlockData
(
block_data
.to_vec
()),
...
...
@@ -600,7 +601,7 @@ where
return
Ok
(
ValidationResult
::
Invalid
(
InvalidCandidate
::
PoVDecompressionFailure
))
},
};
metrics
.observe_pov_size
(
raw_block_data
.0
.len
());
metrics
.observe_pov_size
(
raw_block_data
.0
.len
()
,
false
);
let
params
=
ValidationParams
{
parent_head
:
persisted_validation_data
.parent_head
.clone
(),
...
...
This diff is collapsed.
Click to expand it.
polkadot/node/core/candidate-validation/src/metrics.rs
+
9
−
5
View file @
a200d4c9
...
...
@@ -23,7 +23,7 @@ pub(crate) struct MetricsInner {
pub
(
crate
)
validate_from_chain_state
:
prometheus
::
Histogram
,
pub
(
crate
)
validate_from_exhaustive
:
prometheus
::
Histogram
,
pub
(
crate
)
validate_candidate_exhaustive
:
prometheus
::
Histogram
,
pub
(
crate
)
pov_size
:
prometheus
::
Histogram
,
pub
(
crate
)
pov_size
:
prometheus
::
Histogram
Vec
,
pub
(
crate
)
code_size
:
prometheus
::
Histogram
,
}
...
...
@@ -77,9 +77,12 @@ impl Metrics {
}
}
pub
fn
observe_pov_size
(
&
self
,
pov_size
:
usize
)
{
pub
fn
observe_pov_size
(
&
self
,
pov_size
:
usize
,
compressed
:
bool
)
{
if
let
Some
(
metrics
)
=
&
self
.0
{
metrics
.pov_size
.observe
(
pov_size
as
f64
);
metrics
.pov_size
.with_label_values
(
&
[
if
compressed
{
"true"
}
else
{
"false"
}])
.observe
(
pov_size
as
f64
);
}
}
}
...
...
@@ -119,15 +122,16 @@ impl metrics::Metrics for Metrics {
registry
,
)
?
,
pov_size
:
prometheus
::
register
(
prometheus
::
Histogram
::
with_opts
(
prometheus
::
Histogram
Vec
::
new
(
prometheus
::
HistogramOpts
::
new
(
"polkadot_parachain_candidate_validation_pov_size"
,
"The
size of the
decompressed proof of validity of a candidate"
,
"The
compressed and
decompressed
size of the
proof of validity of a candidate"
,
)
.buckets
(
prometheus
::
exponential_buckets
(
16384.0
,
2.0
,
10
)
.expect
(
"arguments are always valid; qed"
),
),
&
[
"compressed"
],
)
?
,
registry
,
)
?
,
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment