@@ -57,16 +57,15 @@ struct MetricsInner {
5757 /// query further validators.
5858 retries : Counter < U64 > ,
5959
60- /// Number of candidates for which we initiated early chunk fetching.
61- early_candidates_fetched : Counter < U64 > ,
62- /// Number of candidates for which we initiated on-time (slow path) chunk fetching.
63- slow_candidates_fetched : Counter < U64 > ,
64- /// Number of early-fetched candidates that never made it on-chain.
65- early_candidates_never_onchain : Counter < U64 > ,
66-
67- /// Number of candidates fetched early that later appeared on slow path, implying we skipped a
68- /// duplicate fetch when they became occupied.
69- early_candidates_skipped_on_slow : Counter < U64 > ,
60+ /// Number of candidates for which we initiated chunk fetching before getting backed on chain (early path).
61+ early_fetched_candidates : Counter < U64 > ,
62+
63+ /// Number of candidates for which we initiated chunk fetching after getting backed on chain (late path).
64+ late_fetched_candidates : Counter < U64 > ,
65+
66+ /// Number of early-fetched candidates that appeared on the occupied core as backed,
67+ /// avoiding redundant fetches by reusing existing data.
68+ early_candidates_backed_on_chain : Counter < U64 > ,
7069}
7170
7271impl Metrics {
@@ -111,30 +110,23 @@ impl Metrics {
111110 }
112111
113112 /// Increment early candidates fetched counter.
114- pub fn on_early_candidate_fetched ( & self ) {
115- if let Some ( metrics) = & self . 0 {
116- metrics. early_candidates_fetched . inc ( )
117- }
118- }
119-
120- /// Increment slow candidates fetched counter.
121- pub fn on_slow_candidate_fetched ( & self ) {
113+ pub fn on_early_fetched_candidate ( & self ) {
122114 if let Some ( metrics) = & self . 0 {
123- metrics. slow_candidates_fetched . inc ( )
115+ metrics. early_fetched_candidates . inc ( )
124116 }
125117 }
126118
127- /// Increment early candidates that never made it on-chain counter.
128- pub fn on_early_candidate_never_onchain ( & self ) {
119+ /// Increment late candidates fetched counter.
120+ pub fn on_late_fetched_candidate ( & self ) {
129121 if let Some ( metrics) = & self . 0 {
130- metrics. early_candidates_never_onchain . inc ( )
122+ metrics. late_fetched_candidates . inc ( )
131123 }
132124 }
133125
134- /// Increment early candidates that later appeared on slow path ( duplicate fetch skipped).
135- pub fn on_early_candidate_skipped_on_slow ( & self ) {
126+ /// Increment early fetched candidates that later got backed on chain counter.(skipped duplicate fetch)
127+ pub fn on_early_candidate_backed_on_chain ( & self ) {
136128 if let Some ( metrics) = & self . 0 {
137- metrics. early_candidates_skipped_on_slow . inc ( )
129+ metrics. early_candidates_backed_on_chain . inc ( )
138130 }
139131 }
140132}
@@ -189,31 +181,24 @@ impl metrics::Metrics for Metrics {
189181 ) ?,
190182 registry,
191183 ) ?,
192- early_candidates_fetched : prometheus:: register (
184+ early_fetched_candidates : prometheus:: register (
193185 Counter :: new (
194186 "polkadot_parachain_early_candidates_fetched_total" ,
195- "Number of candidates for which we initiated early chunk fetching." ,
196- ) ?,
197- registry,
198- ) ?,
199- slow_candidates_fetched : prometheus:: register (
200- Counter :: new (
201- "polkadot_parachain_slow_candidates_fetched_total" ,
202- "Number of candidates for which we initiated on-time (slow path) chunk fetching." ,
187+ "Number of candidates for which we initiated chunk fetching before getting backed on chain (early path)." ,
203188 ) ?,
204189 registry,
205190 ) ?,
206- early_candidates_never_onchain : prometheus:: register (
191+ late_fetched_candidates : prometheus:: register (
207192 Counter :: new (
208- "polkadot_parachain_early_candidates_never_onchain_total " ,
209- "Number of early-fetched candidates that never made it on- chain." ,
193+ "polkadot_parachain_late_fetched_candidates_total " ,
194+ "Number of candidates for which we initiated chunk fetching after getting backed on chain (late path) ." ,
210195 ) ?,
211196 registry,
212197 ) ?,
213- early_candidates_skipped_on_slow : prometheus:: register (
198+ early_candidates_backed_on_chain : prometheus:: register (
214199 Counter :: new (
215- "polkadot_parachain_early_candidates_skipped_on_slow_total " ,
216- "Number of early-fetched candidates that later appeared on the slow path (duplicate fetch skipped)." ,
200+ "polkadot_parachain_early_candidates_backed_on_chain_total " ,
201+ "Number of early-fetched candidates that later got backed on chain (duplicate fetch skipped)." ,
217202 ) ?,
218203 registry,
219204 ) ?,
0 commit comments