indexer: fix metrics, reduce DB load#2272
indexer: fix metrics, reduce DB load#2272mslipper merged 3 commits intoethereum-optimism:developfrom
Conversation
|
Codecov Report
@@ Coverage Diff @@
## develop #2272 +/- ##
========================================
Coverage 80.08% 80.08%
========================================
Files 77 77
Lines 2460 2460
Branches 450 450
========================================
Hits 1970 1970
Misses 490 490
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
| deposits := depositsByBlockHash[blockHash] | ||
| batches := stateBatches[blockHash] | ||
|
|
||
| if len(deposits) == 0 && len(batches) == 0 && i != len(headers)-1 { |
There was a problem hiding this comment.
Cool, this saves a lot of unnecessary db call preps.
| headerSelector *ConfirmedHeaderSelector | ||
|
|
||
| metrics *metrics.Metrics | ||
| metrics *metrics.Metrics |
There was a problem hiding this comment.
Not sure where these came from, gofmt should have fixed them, thanks.
| return &Metrics{ | ||
| SyncHeight: promauto.NewGaugeVec(prometheus.GaugeOpts{ | ||
| Name: "l1_sync_height", | ||
| Name: "sync_height", |
There was a problem hiding this comment.
I see we are using a single metric with l1/l2 labels. Should the Help comment below be updated to reflect the same?
There was a problem hiding this comment.
Yeah good catch. Fixing now.
This PR - adds the acceptance test for the preinterop which is being skipped as of now due `op_contract_deployer_params ` issues - fix the flaky existing test cases Closes #2272
This PR - adds the acceptance test for the preinterop which is being skipped as of now due `op_contract_deployer_params ` issues - fix the flaky existing test cases Closes #2272
No description provided.