-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat(models): adds benchmark model generator #89
feat(models): adds benchmark model generator #89
Conversation
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
c533f06
to
9424a81
Compare
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
5864ec9
to
fd46196
Compare
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
80bdc3e
to
60199ab
Compare
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
nDeclarations = 1, | ||
nProperties = 1, | ||
}) { | ||
if (generateUpToSize > v8.getHeapStatistics().total_heap_size) { |
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.
total_available_size
would be a tighter fit
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.
Addressed ✅
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
@mttrbrts can you please advise me on the best way to polyfill v8. I'm getting the following error in the pipeline:
This seems to be an option: https://www.npmjs.com/package/node-polyfill-webpack-plugin, however it's an extra dependency. |
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
…_size Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
node-polyfill-webpack-plugin is probably what you want. It basically adds the Node pollyfills that were in Webpack 4 and earlier to Webpack 5+. |
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Unfortunately it doesn't polyfill the v8 engine. |
Signed-off-by: Stefan Blaginov <[email protected]> Signed-off-by: Stefan Blaginov <[email protected]>
Addressed by limiting model size to 100 MiB. |
Changes
Adds a Concerto benchmark model generator. This API allows you to generate models of varying sizes which can be used to test the performance of your Concerto-handling code.
Generate a model up to a specified number of declarations and properties
You can generate a model up to a specified number of declarations and properties using:
Generate a model up to a specified size in bytes
You can generate a model up to a specified size in bytes, however you would need to specify how that model should grow.
Grow model by number of declarations
If you'd like to grow it by number of declarations, you will need to specify the number of properties that you wish the model to have (defaults to
1
):Grow model by number of properties
If you'd like to grow it by number of properties, you will need to specify the number of declarations that you wish the model to have (defaults to
1
):The expected response will include an array of generated
models
(currently containing only a single model) and ametadata
object with information about the generated model e.g:As you can see from the above example model, the generator will try its best to reach the upper
generateUpToSize
reqested size, but may fall short by a few bytes.Author Checklist
--signoff
option of git commit.main
fromfork:branchname