Add extra statistic to track the number of signature validation operations #1289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an extra statistic to the extended statistics to track the number of signature validation operations performed by the validator module. This is mostly useful for research purposes, as it makes it possible to track the workload required for cryptographic operations over time.
The statistic tracks the number of calls to
verify_canonrrset(..)
inval_sigcrypt.c
. The implementation follows the same pattern as for the statistic that tracks the number of bogus RRsets. That is: there is a lock around operations that change or read the statistic (I assume this is because the validator module is not replicated in each thread if Unbound runs multi-threaded).It would be much appreciated if this patch could be considered for merging as it would help us in research into performance of PQC algorithms; I admit that the extra lock/unlock operation around updates of the statistic adds overhead, I didn't immediately see an easy way to mitigate this as information on whether or not extended statistics are enabled is not available at the abstraction level where the statistic needs to be updated. It seems this is deemed acceptable for tracking the number of bogus RRsets, so hoping one more lock/unlock is fine here.