diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index 451ecab15f8..9b59447ddf4 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -267,7 +267,7 @@ export class Archiver implements ArchiveSource { await this.handleEpochPrune(provenBlockNumber, currentL1BlockNumber); const storeSizes = this.store.estimateSize(); - this.instrumentation.recordDBMetrics(storeSizes.mappingSize, storeSizes.numItems, storeSizes.actualSize); + this.instrumentation.recordDBMetrics(storeSizes); } } diff --git a/yarn-project/archiver/src/archiver/instrumentation.ts b/yarn-project/archiver/src/archiver/instrumentation.ts index 119bb14010a..1d6343b8f9d 100644 --- a/yarn-project/archiver/src/archiver/instrumentation.ts +++ b/yarn-project/archiver/src/archiver/instrumentation.ts @@ -75,8 +75,8 @@ export class ArchiverInstrumentation { ); } - public recordDBMetrics(dbMapSize: number, dbNumItems: number, dbUsedSize: number) { - this.dbMetrics.recordDBMetrics(dbMapSize, dbNumItems, dbUsedSize); + public recordDBMetrics(metrics: { mappingSize: number; numItems: number; actualSize: number }) { + this.dbMetrics.recordDBMetrics(metrics); } public isEnabled(): boolean { diff --git a/yarn-project/p2p/src/mem_pools/instrumentation.ts b/yarn-project/p2p/src/mem_pools/instrumentation.ts index 45e3cde4f6b..8f335b149fb 100644 --- a/yarn-project/p2p/src/mem_pools/instrumentation.ts +++ b/yarn-project/p2p/src/mem_pools/instrumentation.ts @@ -62,8 +62,8 @@ export class PoolInstrumentation { ); } - public recordDBMetrics(dbMapSize: number, dbNumItems: number, dbUsedSize: number) { - this.dbMetrics.recordDBMetrics(dbMapSize, dbNumItems, dbUsedSize); + public recordDBMetrics(metrics: { mappingSize: number; numItems: number; actualSize: number }) { + this.dbMetrics.recordDBMetrics(metrics); } public recordSize(poolObject: PoolObject) { diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts b/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts index 5b409013cd2..9a937284697 100644 --- a/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts +++ b/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts @@ -54,7 +54,7 @@ export class AztecKVTxPool implements TxPool { this.#metrics.recordRemovedObjects(deleted, 'pending'); this.#metrics.recordAddedObjects(txHashes.length, 'mined'); const storeSizes = this.#store.estimateSize(); - this.#metrics.recordDBMetrics(storeSizes.mappingSize, storeSizes.numItems, storeSizes.actualSize); + this.#metrics.recordDBMetrics(storeSizes); }); } diff --git a/yarn-project/telemetry-client/src/lmdb_metrics.ts b/yarn-project/telemetry-client/src/lmdb_metrics.ts index 62d98dcece6..c8efc91a801 100644 --- a/yarn-project/telemetry-client/src/lmdb_metrics.ts +++ b/yarn-project/telemetry-client/src/lmdb_metrics.ts @@ -30,9 +30,9 @@ export class LmdbMetrics { }); } - public recordDBMetrics(dbMapSize: number, dbNumItems: number, dbUsedSize: number) { - this.dbMapSize.record(dbMapSize); - this.dbNumItems.record(dbNumItems); - this.dbUsedSize.record(dbUsedSize); + public recordDBMetrics(metrics: { mappingSize: number; numItems: number; actualSize: number }) { + this.dbMapSize.record(metrics.mappingSize); + this.dbNumItems.record(metrics.actualSize); + this.dbUsedSize.record(metrics.actualSize); } }