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
0d78ad65
Unverified
Commit
0d78ad65
authored
Dec 05, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: singular/span batch metric as eventvec with type label
parent
bc663a4f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
26 deletions
+11
-26
metrics.go
op-node/metrics/metrics.go
+6
-16
channel_in_reader.go
op-node/rollup/derive/channel_in_reader.go
+2
-2
pipeline.go
op-node/rollup/derive/pipeline.go
+1
-2
driver.go
op-node/rollup/driver/driver.go
+1
-2
metrics.go
op-service/testutils/metrics.go
+1
-4
No files found.
op-node/metrics/metrics.go
View file @
0d78ad65
...
...
@@ -46,8 +46,7 @@ type Metricer interface {
RecordL1Ref
(
name
string
,
ref
eth
.
L1BlockRef
)
RecordL2Ref
(
name
string
,
ref
eth
.
L2BlockRef
)
RecordUnsafePayloadsBuffer
(
length
uint64
,
memSize
uint64
,
next
eth
.
BlockID
)
RecordDerivedSingularBatches
()
RecordDerivedSpanBatches
()
RecordDerivedBatches
(
batchType
string
)
CountSequencedTxs
(
count
int
)
RecordL1ReorgDepth
(
d
uint64
)
RecordSequencerInconsistentL1Origin
(
from
eth
.
BlockID
,
to
eth
.
BlockID
)
...
...
@@ -95,8 +94,7 @@ type Metrics struct {
SequencingErrors
*
metrics
.
Event
PublishingErrors
*
metrics
.
Event
DerivedSingularBatches
*
metrics
.
Event
DerivedSpanBatches
*
metrics
.
Event
DerivedBatches
metrics
.
EventVec
P2PReqDurationSeconds
*
prometheus
.
HistogramVec
P2PReqTotal
*
prometheus
.
CounterVec
...
...
@@ -197,8 +195,7 @@ func NewMetrics(procName string) *Metrics {
SequencingErrors
:
metrics
.
NewEvent
(
factory
,
ns
,
""
,
"sequencing_errors"
,
"sequencing errors"
),
PublishingErrors
:
metrics
.
NewEvent
(
factory
,
ns
,
""
,
"publishing_errors"
,
"p2p publishing errors"
),
DerivedSingularBatches
:
metrics
.
NewEvent
(
factory
,
ns
,
""
,
"derived_singular_batches"
,
"derived singular batches"
),
DerivedSpanBatches
:
metrics
.
NewEvent
(
factory
,
ns
,
""
,
"derived_span_batches"
,
"derived span batches"
),
DerivedBatches
:
metrics
.
NewEventVec
(
factory
,
ns
,
""
,
"derived_batches"
,
"derived batches"
,
[]
string
{
"type"
}),
SequencerInconsistentL1Origin
:
metrics
.
NewEvent
(
factory
,
ns
,
""
,
"sequencer_inconsistent_l1_origin"
,
"events when the sequencer selects an inconsistent L1 origin"
),
SequencerResets
:
metrics
.
NewEvent
(
factory
,
ns
,
""
,
"sequencer_resets"
,
"sequencer resets"
),
...
...
@@ -457,12 +454,8 @@ func (m *Metrics) RecordUnsafePayloadsBuffer(length uint64, memSize uint64, next
m
.
UnsafePayloadsBufferMemSize
.
Set
(
float64
(
memSize
))
}
func
(
m
*
Metrics
)
RecordDerivedSingularBatches
()
{
m
.
DerivedSingularBatches
.
Record
()
}
func
(
m
*
Metrics
)
RecordDerivedSpanBatches
()
{
m
.
DerivedSpanBatches
.
Record
()
func
(
m
*
Metrics
)
RecordDerivedBatches
(
batchType
string
)
{
m
.
DerivedBatches
.
Record
(
batchType
)
}
func
(
m
*
Metrics
)
CountSequencedTxs
(
count
int
)
{
...
...
@@ -662,10 +655,7 @@ func (n *noopMetricer) RecordL2Ref(name string, ref eth.L2BlockRef) {
func
(
n
*
noopMetricer
)
RecordUnsafePayloadsBuffer
(
length
uint64
,
memSize
uint64
,
next
eth
.
BlockID
)
{
}
func
(
n
*
noopMetricer
)
RecordDerivedSingularBatches
()
{
}
func
(
n
*
noopMetricer
)
RecordDerivedSpanBatches
()
{
func
(
n
*
noopMetricer
)
RecordDerivedBatches
(
batchType
string
)
{
}
func
(
n
*
noopMetricer
)
CountSequencedTxs
(
count
int
)
{
...
...
op-node/rollup/derive/channel_in_reader.go
View file @
0d78ad65
...
...
@@ -97,7 +97,7 @@ func (cr *ChannelInReader) NextBatch(ctx context.Context) (Batch, error) {
return
nil
,
NewCriticalError
(
errors
.
New
(
"failed type assertion to SingularBatch"
))
}
cr
.
log
.
Debug
(
"decoded singular batch from channel"
)
cr
.
metrics
.
RecordDerived
SingularBatches
(
)
cr
.
metrics
.
RecordDerived
Batches
(
"singular"
)
return
singularBatch
,
nil
case
SpanBatchType
:
if
origin
:=
cr
.
Origin
();
!
cr
.
cfg
.
IsDelta
(
origin
.
Time
)
{
...
...
@@ -116,7 +116,7 @@ func (cr *ChannelInReader) NextBatch(ctx context.Context) (Batch, error) {
return
nil
,
err
}
cr
.
log
.
Debug
(
"decoded span batch from channel"
)
cr
.
metrics
.
RecordDerived
SpanBatches
(
)
cr
.
metrics
.
RecordDerived
Batches
(
"span"
)
return
spanBatch
,
nil
default
:
// error is bubbled up to user, but pipeline can skip the batch and continue after.
...
...
op-node/rollup/derive/pipeline.go
View file @
0d78ad65
...
...
@@ -21,8 +21,7 @@ type Metrics interface {
RecordHeadChannelOpened
()
RecordChannelTimedOut
()
RecordFrame
()
RecordDerivedSingularBatches
()
RecordDerivedSpanBatches
()
RecordDerivedBatches
(
batchType
string
)
}
type
L1Fetcher
interface
{
...
...
op-node/rollup/driver/driver.go
View file @
0d78ad65
...
...
@@ -27,8 +27,7 @@ type Metrics interface {
RecordChannelTimedOut
()
RecordFrame
()
RecordDerivedSingularBatches
()
RecordDerivedSpanBatches
()
RecordDerivedBatches
(
batchType
string
)
RecordUnsafePayloadsBuffer
(
length
uint64
,
memSize
uint64
,
next
eth
.
BlockID
)
...
...
op-service/testutils/metrics.go
View file @
0d78ad65
...
...
@@ -53,10 +53,7 @@ func (t *TestDerivationMetrics) RecordChannelTimedOut() {
func
(
t
*
TestDerivationMetrics
)
RecordFrame
()
{
}
func
(
n
*
TestDerivationMetrics
)
RecordDerivedSingularBatches
()
{
}
func
(
n
*
TestDerivationMetrics
)
RecordDerivedSpanBatches
()
{
func
(
n
*
TestDerivationMetrics
)
RecordDerivedBatches
(
batchType
string
)
{
}
type
TestRPCMetrics
struct
{}
...
...
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