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

Upgrade transfers_enrich macro and benchmark prices.hour #7077

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

Hosuke
Copy link
Collaborator

@Hosuke Hosuke commented Oct 31, 2024

Benchmark macro's performance with prices.usd and prices.hour

@Hosuke
Copy link
Collaborator Author

Hosuke commented Oct 31, 2024

@Hosuke
Copy link
Collaborator Author

Hosuke commented Oct 31, 2024

Test result using 10 days:
Coverage comparison: https://dune.com/queries/4228497

table_name total_rows rows_with_amount_usd percentage_with_amount_usd
Prices.hour Table 217822608 1520 0.0006978155362091708
Prices.usd Table 217822608 1717808 0.7886270464634231

Different rows:
https://dune.com/queries/4227035

@jeff-dude
Copy link
Member

Test result using 10 days: Coverage comparison: https://dune.com/queries/4228497

table_name total_rows rows_with_amount_usd percentage_with_amount_usd
Prices.hour Table 217822608 1520 0.0006978155362091708
Prices.usd Table 217822608 1717808 0.7886270464634231
Different rows: https://dune.com/queries/4227035

this difference in coverage is shocking. the new dataset is supposed to have 100x or more coverage of tokens. is this isolated to blast chain, where the new prices tables haves v few tokens? or is it possible the queries have a bug?

@jeff-dude
Copy link
Member

A CI error I am not very sure here: https://github.com/duneanalytics/spellbook/actions/runs/11614432989/job/32342585374?pr=7077#step:12:33 cc. @jeff-dude

not sure on this CI error. is this happening every run? i guess not, since you were able to build test tables?

i am able to query both the view prices.hour and raw table the view is built on dune.dune.prices_hour_raw on the app just fine

@jeff-dude jeff-dude added WIP work in progress dbt: tokens covers the Tokens dbt subproject labels Oct 31, 2024
@jeff-dude jeff-dude marked this pull request as draft October 31, 2024 16:51
@Hosuke
Copy link
Collaborator Author

Hosuke commented Nov 1, 2024

Test result using 10 days: Coverage comparison: https://dune.com/queries/4228497
table_name total_rows rows_with_amount_usd percentage_with_amount_usd
Prices.hour Table 217822608 1520 0.0006978155362091708
Prices.usd Table 217822608 1717808 0.7886270464634231
Different rows: https://dune.com/queries/4227035

this difference in coverage is shocking. the new dataset is supposed to have 100x or more coverage of tokens. is this isolated to blast chain, where the new prices tables haves v few tokens? or is it possible the queries have a bug?

Though prices.hour has more tokens in the list than prices.usd:
https://dune.com/queries/4232153

prices.usd covers far more transfers than prices.hour(not sure why):
https://dune.com/queries/4232188

Here is an overview of overlapping tokens count:
https://dune.com/queries/4232136

I think it is possible my queries have a bug...
(We may need the gap tests merged first.)

Another possibility is the prices.hour is not ready for the last few days, I should try with another time period.

@jeff-dude
Copy link
Member

Test result using 10 days: Coverage comparison: https://dune.com/queries/4228497
table_name total_rows rows_with_amount_usd percentage_with_amount_usd
Prices.hour Table 217822608 1520 0.0006978155362091708
Prices.usd Table 217822608 1717808 0.7886270464634231
Different rows: https://dune.com/queries/4227035

this difference in coverage is shocking. the new dataset is supposed to have 100x or more coverage of tokens. is this isolated to blast chain, where the new prices tables haves v few tokens? or is it possible the queries have a bug?

Though prices.hour has more tokens in the list than prices.usd: https://dune.com/queries/4232153

prices.usd covers far more transfers than prices.hour(not sure why): https://dune.com/queries/4232188

Here is an overview of overlapping tokens count: https://dune.com/queries/4232136

I think it is possible my queries have a bug... (We may need the gap tests merged first.)

Another possibility is the prices.hour is not ready for the last few days, I should try with another time period.

yes, use random historical timeframe to test to be safe. something like oct 1st 2024 - oct 10th 2024 (or something like that)

, prices_model = null
, evms_info_model = null
, transfers_start_date = '2000-01-01'
, transfers_end_date = '9999-12-31'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding transfers_end_date param for benchmark and testing.

@Hosuke
Copy link
Collaborator Author

Hosuke commented Nov 7, 2024

ethereum.transfers coverage test:
https://dune.com/queries/4259419

table_name total_rows rows_with_amount_usd percentage_with_amount_usd
Prices.hour Table 5162151 1578406 30.576517424616213
Prices.usd Table 5162151 2193279 42.48769553622124

blast.transfers coverage test:
https://dune.com/queries/4259432

table_name total_rows rows_with_amount_usd percentage_with_amount_usd
Prices.hour Table 4282513 1281094 29.91453849643889
Prices.usd Table 4282513 1684401 39.332069745030545

@Hosuke
Copy link
Collaborator Author

Hosuke commented Nov 25, 2024

Repeat the experiments above, a slightly different result:

ethereum.transfers coverage test:
https://dune.com/queries/4331351

table_name total_rows rows_with_amount_usd percentage_with_amount_usd
Prices.hour Table 5655920 2076310 36.710384871073146
Prices.usd Table 5162151 2193965 42.50098457019177

blast.transfers coverage test:
https://dune.com/queries/4331536

table_name total_rows rows_with_amount_usd percentage_with_amount_usd
Prices.hour Table 4687341 1689902 36.05246556629867
Prices.usd Table 4282513 1684401 39.332069745030545

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt: tokens covers the Tokens dbt subproject WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants