Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Time To Seal metric to access node to track time it takes to seal a transaction #6512

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

AndriiDiachuk
Copy link
Contributor

Closes: #6448.

@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 6.52174% with 86 lines in your changes missing coverage. Please review.

Project coverage is 41.53%. Comparing base (0dde730) to head (7630bf9).

Files with missing lines Patch % Lines
module/metrics/transaction.go 0.00% 44 Missing ⚠️
...chronization/indexer/collection_executed_metric.go 19.35% 24 Missing and 1 partial ⚠️
cmd/access/node_builder/access_node_builder.go 0.00% 6 Missing ⚠️
cmd/observer/node_builder/observer_builder.go 0.00% 6 Missing ⚠️
module/mock/access_metrics.go 0.00% 2 Missing ⚠️
module/mock/transaction_metrics.go 0.00% 2 Missing ⚠️
module/metrics/noop.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6512      +/-   ##
==========================================
+ Coverage   41.28%   41.53%   +0.24%     
==========================================
  Files        2033     2033              
  Lines      145981   181785   +35804     
==========================================
+ Hits        60269    75501   +15232     
- Misses      79486   100055   +20569     
- Partials     6226     6229       +3     
Flag Coverage Δ
unittests 41.53% <6.52%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Guitarheroua Guitarheroua self-requested a review October 2, 2024 14:22
Copy link
Collaborator

@Guitarheroua Guitarheroua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have few small remarks.

module/metrics/transaction.go Outdated Show resolved Hide resolved
module/metrics/transaction.go Outdated Show resolved Hide resolved
AndriiDiachuk and others added 3 commits October 18, 2024 12:47
…c.go

Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
…c.go

Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
}

// CollectionFinalized tracks collections to mark finalized
func (c *CollectionExecutedMetricImpl) CollectionFinalized(light flow.LightCollection) {
if ti, found := c.collectionsToMarkFinalized.ByID(light.ID()); found {
for _, t := range light.Transactions {
c.accessMetrics.TransactionFinalized(t, ti)

block, err := c.blocks.ByCollectionID(light.ID())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be looked up outside of the loop, and the blockID result reused

}

var err error
collectionExecutedMetricImpl.blockTransactions, err = stdmap.NewIdentifierMap(100)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's instantiate and pass this in like the other stdmap.* objects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Time To Seal metric to access node to track time it takes to seal a transaction
5 participants