@@ -132,6 +132,8 @@ func (m *BoostService) innerGetPayload(log *logrus.Entry, signedBlindedBeaconBlo
132132 "msIntoSlot" : msIntoSlot ,
133133 }).Infof ("submitBlindedBlock request start - %d milliseconds into slot %d" , msIntoSlot , slot )
134134
135+ // storing via function to not run into too many decision paths
136+ recordGetPayloadMsIntoSlot (version , msIntoSlot )
135137 // Get the bid!
136138 m .bidsLock .Lock ()
137139 originalBid := m .bids [bidKey (slot , blockHash )]
@@ -231,7 +233,7 @@ func (m *BoostService) innerGetPayload(log *logrus.Entry, signedBlindedBeaconBlo
231233 innerLog .Debug ("submitting signed blinded block" )
232234 start := time .Now ()
233235 resp , err := m .httpClientGetPayload .Do (req )
234- RecordRelayLatency (endpoint , relay .URL .Hostname (), float64 (time .Since (start ).Microseconds ()))
236+ RecordRelayLatency (endpoint , relay .URL .Hostname (), float64 (time .Since (start ).Milliseconds ()))
235237 if err != nil {
236238 innerLog .WithError (err ).Warnf ("error calling getPayload%s on relay" , versionToUse )
237239 return nil , err
@@ -696,6 +698,14 @@ func (m *BoostService) respondGetPayloadSSZ(w http.ResponseWriter, result *build
696698// Other Functions
697699////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
698700
701+ func recordGetPayloadMsIntoSlot (version GetPayloadVersion , msIntoSlot uint64 ) {
702+ endpoint := params .PathGetPayload
703+ if version == GetPayloadV2 {
704+ endpoint = params .PathGetPayloadV2
705+ }
706+ RecordMsIntoSlot (endpoint , float64 (msIntoSlot ))
707+ }
708+
699709// bidKey makes a map key for a specific bid
700710func bidKey (slot phase0.Slot , blockHash phase0.Hash32 ) string {
701711 return fmt .Sprintf ("%v%v" , slot , blockHash )
0 commit comments