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

Implement deal and provider coverage calculation #6

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

masih
Copy link
Member

@masih masih commented Nov 25, 2022

Implement metrics that calculate deals and provider coverage by the indexer.

Deal coverage is calculated as: sum of deals discoverable by the indexer divided by total discoverable deals. The term "discoverable" here implies that the provider of the deal has a non-nil address discovered via FileCoin API.

Provider coverage is calculated as: number of providers known by the indexer with at least one deal divided by total number of discoverable providers with at least one deal.

This commit also removes WIP test files pushed by accident in earlier PRs.

Fixes #5

@masih masih requested a review from willscott November 25, 2022 18:28
Implement metrics that calculate deals and provider coverage by the
indexer.

Deal coverage is calculated as: sum of deals discoverable by the indexer
divided by total discoverable deals. The term "discoverable" here
implies that the provider of the deal has a non-nil address
discovered via FileCoin API.

Provider coverage is calculated as: number of providers known by the
indexer with at least one deal divided by total number of discoverable
providers with at least one deal.

This commit also removes WIP test files pushed by accident in earlier
PRs.

Fixes #5
@masih masih force-pushed the masih/coverage_ratio_metrics branch from 7c37e09 to d535f1b Compare November 25, 2022 18:31
fil_deal_stats.go Show resolved Hide resolved
ds.dealCountByParticipant = dealCountByParticipant
ds.refreshLock.Unlock()
ds.hf.metrics.notifyDealCount(totalDealCount)
logger.Infow("fetched state market deals", "count", totalDealCount)
Copy link
Member

Choose a reason for hiding this comment

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

rather than just doing dealCount - it would be interesting if we could try correlate on contextID since we know filecoin providers will put in their deal ID as the context ID

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good.
What's here is equivalent to how we measure it in index-observer.

Ok to do this in a separate PR?

Copy link
Member

Choose a reason for hiding this comment

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

for sure 👍

@masih masih merged commit aefda08 into main Nov 25, 2022
@masih masih deleted the masih/coverage_ratio_metrics branch November 25, 2022 19:55
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.

Measure FileCoin deal coverage
2 participants