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
bd65ee51
Unverified
Commit
bd65ee51
authored
Aug 03, 2022
by
Matthew Slipper
Committed by
GitHub
Aug 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: Add transactions sequenced metric (#3162)
This will allow us to measure opnode throughput.
parent
a1842698
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
metrics.go
op-node/metrics/metrics.go
+8
-0
state.go
op-node/rollup/driver/state.go
+1
-0
No files found.
op-node/metrics/metrics.go
View file @
bd65ee51
...
@@ -44,6 +44,8 @@ type Metrics struct {
...
@@ -44,6 +44,8 @@ type Metrics struct {
DerivationErrorsTotal
prometheus
.
Counter
DerivationErrorsTotal
prometheus
.
Counter
Heads
*
prometheus
.
GaugeVec
Heads
*
prometheus
.
GaugeVec
TransactionsSequencedTotal
prometheus
.
Counter
registry
*
prometheus
.
Registry
registry
*
prometheus
.
Registry
}
}
...
@@ -147,6 +149,12 @@ func NewMetrics(procName string) *Metrics {
...
@@ -147,6 +149,12 @@ func NewMetrics(procName string) *Metrics {
"type"
,
"type"
,
}),
}),
TransactionsSequencedTotal
:
promauto
.
With
(
registry
)
.
NewGauge
(
prometheus
.
GaugeOpts
{
Namespace
:
ns
,
Name
:
"transactions_sequenced_total"
,
Help
:
"Count of total transactions sequenced"
,
}),
registry
:
registry
,
registry
:
registry
,
}
}
}
}
...
...
op-node/rollup/driver/state.go
View file @
bd65ee51
...
@@ -244,6 +244,7 @@ func (s *state) createNewL2Block(ctx context.Context) error {
...
@@ -244,6 +244,7 @@ func (s *state) createNewL2Block(ctx context.Context) error {
s
.
l2Head
=
newUnsafeL2Head
s
.
l2Head
=
newUnsafeL2Head
s
.
log
.
Info
(
"Sequenced new l2 block"
,
"l2Head"
,
s
.
l2Head
,
"l1Origin"
,
s
.
l2Head
.
L1Origin
,
"txs"
,
len
(
payload
.
Transactions
),
"time"
,
s
.
l2Head
.
Time
)
s
.
log
.
Info
(
"Sequenced new l2 block"
,
"l2Head"
,
s
.
l2Head
,
"l1Origin"
,
s
.
l2Head
.
L1Origin
,
"txs"
,
len
(
payload
.
Transactions
),
"time"
,
s
.
l2Head
.
Time
)
s
.
metrics
.
TransactionsSequencedTotal
.
Add
(
float64
(
len
(
payload
.
Transactions
)))
if
s
.
network
!=
nil
{
if
s
.
network
!=
nil
{
if
err
:=
s
.
network
.
PublishL2Payload
(
ctx
,
payload
);
err
!=
nil
{
if
err
:=
s
.
network
.
PublishL2Payload
(
ctx
,
payload
);
err
!=
nil
{
...
...
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