Skip to content

Commit

Permalink
Auction resolution latency metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan-Wilson committed Jan 16, 2025
1 parent b214ea6 commit 55044a8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions execution/gethexec/express_lane_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/filters"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"

Expand All @@ -28,6 +29,10 @@ import (
"github.com/offchainlabs/nitro/util/stopwaiter"
)

var (
auctionResolutionLatency = metrics.NewRegisteredHistogram("arb/sequencer/timeboost/auctionresolution", nil, metrics.NewBoundedHistogramSample())
)

type transactionPublisher interface {
PublishTimeboostedTransaction(context.Context, *types.Transaction, *arbitrum_types.ConditionalOptions, chan error)
}
Expand Down Expand Up @@ -204,10 +209,13 @@ func (es *expressLaneService) Start(ctxIn context.Context) {
continue
}
for it.Next() {
timeSinceAuctionClose := es.roundTimingInfo.AuctionClosing - es.roundTimingInfo.TimeTilNextRound()
auctionResolutionLatency.Update(timeSinceAuctionClose.Nanoseconds())
log.Info(
"AuctionResolved: New express lane controller assigned",
"round", it.Event.Round,
"controller", it.Event.FirstPriceExpressLaneController,
"timeSinceAuctionClose", timeSinceAuctionClose,
)
es.roundControl.Store(it.Event.Round, it.Event.FirstPriceExpressLaneController)
}
Expand Down

0 comments on commit 55044a8

Please sign in to comment.