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
[Draft] Refactor Time Series Stats: Use Luxon, Generators and allow any kind of Time Frame sizing #1
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… refactor/time-series-luxon # Conflicts: # packages/framework/src/utils/__tests__/time.spec.ts # packages/framework/src/utils/time.ts
More tests to be added to make sure nothing broke along the way |
MHHukiewitz
changed the title
Refactor Time Series Stats: Use Luxon, Generators and allow any kind of Time Frame sizing
[Draft] Refactor Time Series Stats: Use Luxon, Generators and allow any kind of Time Frame sizing
Sep 22, 2022
…ries-luxon # Conflicts: # packages/framework/src/utils/domain/indexer/worker.ts
# Conflicts: # package-lock.json # package.json # packages/core/package-lock.json # packages/framework/package-lock.json # packages/framework/src/utils/domain/indexer/worker.ts # packages/framework/src/utils/stats/timeSeries.ts # packages/framework/src/utils/stats/types.ts # packages/layout/package-lock.json # packages/middleware/package-lock.json
# Conflicts: # packages/core/package.json # packages/framework/package.json
amalcaraz
reviewed
Oct 5, 2022
@@ -152,6 +152,7 @@ export type ParsedTransactionV1 = Omit< | |||
signature: string | |||
blocktime: number | |||
slot: number | |||
account?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it
# Conflicts: # packages/framework/src/utils/domain/indexer/worker.ts
…ard to their stats object
# Conflicts: # package-lock.json # package.json # packages/core/package.json # packages/framework/package.json # packages/framework/src/services/indexer/src/utils/accountTransactionIndexer.ts # packages/framework/src/utils/domain/indexer/worker.ts
# Conflicts: # package-lock.json
2 tasks
# Conflicts: # package-lock.json # package.json # packages/framework/src/services/indexer/src/utils/transactionFetcher.ts
MHHukiewitz
commented
Nov 22, 2022
# Conflicts: # package-lock.json # packages/core/src/utils/time.ts # packages/framework/src/utils/stats/accountTimeSeries.ts # packages/framework/src/utils/stats/timeSeries.ts
Closed for now until #19 is taken care of, as Luxon-type objects are not being correctly serde'd between microservices. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem: Difficult to read and inefficient custom implementation for time series processing
Solution:
Interval
,Duration
,DateTime
)enum TimeFrame
in favor ofDuration
in API and backendutils/time.ts
is now based on generators and executes lazily, where possibleprocess()
function aggregating all stats will now use on average ~10x fewer operations to aggregate all time frame statsBREAKING CHANGE:
timeFrame
is now saved to LevelDB as milliseconds of the time frame duration instead of the oldenum TimeFrame
.