Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
1bc6898a
Unverified
Commit
1bc6898a
authored
Jan 13, 2022
by
Indeavr
Committed by
GitHub
Jan 13, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ethereum-optimism:develop' into develop
parents
8c722a0a
d27e841d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
driver.go
go/batch-submitter/drivers/sequencer/driver.go
+3
-0
metrics.go
go/batch-submitter/metrics/metrics.go
+11
-0
No files found.
go/batch-submitter/drivers/sequencer/driver.go
View file @
1bc6898a
...
...
@@ -175,6 +175,7 @@ func (d *Driver) SubmitBatchTx(
}
shouldStartAt
:=
start
.
Uint64
()
var
pruneCount
int
for
{
batchParams
,
err
:=
GenSequencerBatchParams
(
shouldStartAt
,
d
.
cfg
.
BlockOffset
,
batchElements
,
...
...
@@ -197,6 +198,7 @@ func (d *Driver) SubmitBatchTx(
newBatchElementsLen
:=
(
oldLen
*
9
)
/
10
batchElements
=
batchElements
[
:
newBatchElementsLen
]
log
.
Info
(
name
+
" pruned batch"
,
"old_num_txs"
,
oldLen
,
"new_num_txs"
,
newBatchElementsLen
)
pruneCount
++
continue
}
...
...
@@ -204,6 +206,7 @@ func (d *Driver) SubmitBatchTx(
batchTxBuildTime
:=
float64
(
time
.
Since
(
batchTxBuildStart
)
/
time
.
Millisecond
)
d
.
metrics
.
BatchTxBuildTime
.
Set
(
batchTxBuildTime
)
d
.
metrics
.
NumElementsPerBatch
.
Observe
(
float64
(
len
(
batchElements
)))
d
.
metrics
.
BatchPruneCount
.
Set
(
float64
(
pruneCount
))
log
.
Info
(
name
+
" batch constructed"
,
"num_txs"
,
len
(
batchElements
),
"length"
,
len
(
batchCallData
))
...
...
go/batch-submitter/metrics/metrics.go
View file @
1bc6898a
...
...
@@ -35,6 +35,12 @@ type Metrics struct {
// BatchConfirmationTime tracks the duration it takes to confirm a batch
// transaction.
BatchConfirmationTime
prometheus
.
Gauge
// BatchPruneCount tracks the number of times a batch of sequencer
// transactions is pruned in order to meet the desired size requirements.
//
// NOTE: This is currently only active in the sequencer driver.
BatchPruneCount
prometheus
.
Gauge
}
func
NewMetrics
(
subsystem
string
)
*
Metrics
{
...
...
@@ -99,5 +105,10 @@ func NewMetrics(subsystem string) *Metrics {
Help
:
"Time to confirm batch transactions"
,
Subsystem
:
subsystem
,
}),
BatchPruneCount
:
promauto
.
NewGauge
(
prometheus
.
GaugeOpts
{
Name
:
"batch_submitter_batch_prune_count"
,
Help
:
"Number of times a batch is pruned"
,
Subsystem
:
subsystem
,
}),
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment