This repository was archived by the owner on Nov 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Process events in batches #39
Merged
Merged
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
71acd57
silence some test logs
mariusandra c605b8d
admit defeat in the battle with `esModuleInterop`
mariusandra cf0bc59
add basic typescript piscina workers
mariusandra cc8b50e
es module fix
mariusandra 6b31621
remove rollup and compile directly with typescript
mariusandra 9185fdb
fix fetch import error
mariusandra 517ddb8
make piscina work in jest, dist and dev... run plugins through it
mariusandra 27fd502
simplify tests
mariusandra 630cf58
store plugin status on the `server`
mariusandra 4456126
config types
mariusandra 2f0a872
not all keys needed
mariusandra 6143d11
add worker concurrency setting
mariusandra 2ed6fee
clean up code
mariusandra 92b2445
fix test worker code
mariusandra 9b85afa
add a basic benchmark test
mariusandra c04f73d
merge
mariusandra f4ec9a7
refactor test
mariusandra 45c90e9
refactor test utils
mariusandra 4eec9e6
support more serialized binary formats
mariusandra 90b0913
mock jest behind enemy lines
mariusandra 8436771
less verbose logs in tests
mariusandra de14d97
add test to make sure adding more CPU cores makes plugins faster!
mariusandra 5d4685c
clone objects
mariusandra b96f373
add 12
mariusandra e82f67f
fix linter's worries
mariusandra 6438aad
remove extra word
mariusandra 8f42315
improve display
mariusandra 889cbaf
remove the exact cpu count from the list
mariusandra ce933a7
add postgres and redis services to github to make tests pass
mariusandra 9886084
add ENV to config
mariusandra 40195c1
add ENV to config
mariusandra a5cbe9c
process events test wip
mariusandra b8ead06
add db:init script
mariusandra 63a22ce
add db:init script to CI
mariusandra 9ae210a
add db:init script
mariusandra 629751f
add db:init script to CI
mariusandra fe0c6cb
No prepublish on yarn install
mariusandra 24baa9e
Merge branch 'master' into worker-threads
mariusandra b6c0150
Merge branch 'master' into worker-threads
mariusandra 061aa65
Merge branch 'master' into process-events
mariusandra d298dc1
Merge branch 'worker-threads' into process-events
mariusandra 43bd0e3
processEvents in vm
mariusandra 2b24cb6
run plugins on batches of events
mariusandra 9b3c82d
tests for batching performance
mariusandra 8b8f22e
async processEvent & events
mariusandra 59bc1d8
merge
mariusandra 1d1774d
Merge branch 'master' into process-events
mariusandra 31a264d
lint
mariusandra 1023b6d
Merge branch 'master' into process-events
mariusandra 0f8d7f6
performance test batches
mariusandra 2225f6f
not a dev run
mariusandra 42920e4
prettier for ts
mariusandra 3038e1e
prettier
mariusandra 9ffb68f
remove support for PostHog.capture inside `processEvent` for now. Thi…
mariusandra 29a89e3
less round in tests, increase timeout
mariusandra 9f65f77
refactor
mariusandra 9f0a7ba
slight cleanup
mariusandra c4c8ac8
rename `processEvents` to `processEventBatch`
mariusandra 539a6d3
only wait in processEventBatch if needed
mariusandra 42dcee6
Merge branch 'master' into process-events
Twixes 05976ba
Order file extensions more readably in lint-staged
Twixes 9193c54
Prettier
Twixes 015e15f
remove time rounding
mariusandra bdad14c
less lookups
mariusandra 92b8cbc
describe test devmode
mariusandra 0afd70e
add "light"
mariusandra 9dc93ac
Remove redundant Math.round
Twixes 0aaee9d
Run prettier
Twixes b43bce7
Fix performance measurement
Twixes fe28b45
Prettier but correctly
Twixes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,6 +86,6 @@ | |
| } | ||
| }, | ||
| "lint-staged": { | ||
| "*.{js,css,scss}": "prettier --write" | ||
| "*.{js,ts,css,scss}": "prettier --write" | ||
| } | ||
| } | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
Where do we handle the case when there are both
processEventandprocessEventBatch?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.
The user handled it for us in that case. I think it's fine for the user to give both functions (e.g. making custom batching that only works with max 10 events), yet if they want to give just one of the two, the system should still work. Also if they give zero, the system should work... and then just do the plugin differently.