@@ -249,15 +249,15 @@ export function getMetrics(
249
249
labelNames : [ 'hit' ]
250
250
} ) ,
251
251
252
- asyncValidationDelayFromFirstSeen : register . histogram < { topic : TopicLabel } > ( {
252
+ asyncValidationDelayFromFirstSeenSec : register . histogram < { topic : TopicLabel } > ( {
253
253
name : 'gossipsub_async_validation_delay_from_first_seen' ,
254
- help : 'Async validation report delay from first seen' ,
254
+ help : 'Async validation report delay from first seen in second ' ,
255
255
labelNames : [ 'topic' ] ,
256
256
buckets : [ 0.01 , 0.03 , 0.1 , 0.3 , 1 , 3 , 10 ]
257
257
} ) ,
258
258
259
259
asyncValidationUnknownFirstSeen : register . gauge ( {
260
- name : 'gossipsub_async_validation_unknown_first_seen ' ,
260
+ name : 'gossipsub_async_validation_unknown_first_seen_count_total ' ,
261
261
help : 'Async validation report unknown first seen value for message'
262
262
} ) ,
263
263
@@ -588,7 +588,10 @@ export function getMetrics(
588
588
this . meshPeerChurnEvents . inc ( { topic, reason } , count )
589
589
} ,
590
590
591
- // null messageRecord means the message's mcache record was not known at the time of acceptance report
591
+ /**
592
+ * Update validation result to metrics
593
+ * @param messageRecord null means the message's mcache record was not known at the time of acceptance report
594
+ */
592
595
onReportValidation (
593
596
messageRecord : { message : { topic : TopicStr } } | null ,
594
597
acceptance : TopicValidatorResult ,
@@ -598,11 +601,11 @@ export function getMetrics(
598
601
599
602
if ( messageRecord != null ) {
600
603
const topic = this . toTopic ( messageRecord . message . topic )
601
- this . asyncValidationResult . inc ( { topic : topic , acceptance } )
604
+ this . asyncValidationResult . inc ( { topic, acceptance } )
602
605
}
603
606
604
607
if ( firstSeenTimestampMs != null ) {
605
- this . asyncValidationDelayFromFirstSeen . observe ( ( Date . now ( ) - firstSeenTimestampMs ) / 1000 )
608
+ this . asyncValidationDelayFromFirstSeenSec . observe ( ( Date . now ( ) - firstSeenTimestampMs ) / 1000 )
606
609
} else {
607
610
this . asyncValidationUnknownFirstSeen . inc ( )
608
611
}
0 commit comments