Conversation
Signed-off-by: 7suyash7 <suyashnyn1@gmail.com>
fab-10
left a comment
There was a problem hiding this comment.
Since these metrics are related to the txpool, you can add them to the existing TransactionPoolMetrics class, that should also make the whole PR much smaller, since you do not need to pass around the metrics system.
@fab-10 I just updated it, can you please take a look. |
| private final ConcurrentHashMap<VersionedHash, BlobsWithCommitments.BlobQuad> blobCacheTracker = | ||
| new ConcurrentHashMap<>(); |
There was a problem hiding this comment.
what is this for? it seems to have no real usage
There was a problem hiding this comment.
It's being used to maintain the count of blobs in the cache...
There was a problem hiding this comment.
better to add a size method to BlobCache, it is simpler and avoid keeping this extra map
There was a problem hiding this comment.
Okay, I was trying to avoid doing that... I have added it now and removed the extra map
metrics/core/src/main/java/org/hyperledger/besu/metrics/BesuMetricCategory.java
Outdated
Show resolved
Hide resolved
Signed-off-by: 7suyash7 <suyashnyn1@gmail.com>
| private final ConcurrentHashMap<VersionedHash, BlobsWithCommitments.BlobQuad> blobCacheTracker = | ||
| new ConcurrentHashMap<>(); |
There was a problem hiding this comment.
better to add a size method to BlobCache, it is simpler and avoid keeping this extra map
Signed-off-by: 7suyash7 <suyashnyn1@gmail.com>
fab-10
left a comment
There was a problem hiding this comment.
LGTM, just add a CHANGELOG entry and its done
Signed-off-by: 7suyash7 <suyashnyn1@gmail.com>
Done! |
* Add BlobMetrics Signed-off-by: 7suyash7 <suyashnyn1@gmail.com> * refactor Signed-off-by: 7suyash7 <suyashnyn1@gmail.com> * remove unused blob_storage Signed-off-by: 7suyash7 <suyashnyn1@gmail.com> * add .size() to BlobCache Signed-off-by: 7suyash7 <suyashnyn1@gmail.com> * Add to Changelog Signed-off-by: 7suyash7 <suyashnyn1@gmail.com> --------- Signed-off-by: 7suyash7 <suyashnyn1@gmail.com> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Add support for metrics, besu_blob_storage_cache_size:
TransactionPool.cacheForBlobsOfTransactionsAddedToABlockand besu_blob_storage_blob_map_size:TransactionPool.mapOfBlobsInTransactionPool#7578