Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilWindle committed Nov 20, 2024
1 parent 2567055 commit 15b7d8c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion yarn-project/archiver/src/archiver/archiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
4 changes: 2 additions & 2 deletions yarn-project/archiver/src/archiver/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/p2p/src/mem_pools/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export class PoolInstrumentation<PoolObject extends Gossipable> {
);
}

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) {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

Expand Down
8 changes: 4 additions & 4 deletions yarn-project/telemetry-client/src/lmdb_metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 15b7d8c

Please sign in to comment.