Commit 07f1ad01 authored by Matthew Slipper's avatar Matthew Slipper

batch-submitter: Fix the numTxPerBatch metric

Changes the `numTxPerBatch` metric to observe the actual number of elements inside `batchParams` rather than `endBlock - startBlock`.

Metadata:

- Fixes ENG-1807
parent cf274db0
---
'@eth-optimism/batch-submitter': patch
---
Fix the numTxPerBatch metric
...@@ -232,7 +232,7 @@ export class TransactionBatchSubmitter extends BatchSubmitter { ...@@ -232,7 +232,7 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
const batchTxBuildEnd = performance.now() const batchTxBuildEnd = performance.now()
this.metrics.batchTxBuildTime.set(batchTxBuildEnd - batchTxBuildStart) this.metrics.batchTxBuildTime.set(batchTxBuildEnd - batchTxBuildStart)
this.metrics.numTxPerBatch.observe(endBlock - startBlock) this.metrics.numTxPerBatch.observe(batchParams.totalElementsToAppend)
const l1tipHeight = await this.signer.provider.getBlockNumber() const l1tipHeight = await this.signer.provider.getBlockNumber()
this.logger.debug('Submitting batch.', { this.logger.debug('Submitting batch.', {
calldata: batchParams, calldata: batchParams,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment