Repository navigation
expose function run performance metadata from function-runner - #53
Merged
Merged
Conversation
jacobsteves
force-pushed
the
js.add-perf-metadata-to-run
branch
from
May 29, 2026 17:12
242081e to
6fb7e37
Compare
jacobsteves
requested review from
lopert and
saga-dasgupta
and removed request for
saga-dasgupta
May 29, 2026 17:21
jacobsteves
force-pushed
the
js.add-perf-metadata-to-run
branch
from
June 2, 2026 14:48
6fb7e37 to
370c196
Compare
Comment on lines
+401
to
+429
| it.each([ | ||
| ["null", () => JSON.stringify(null)], | ||
| ["string", () => JSON.stringify("not an object")], | ||
| [ | ||
| "missing output", | ||
| () => runnerOutputJson((result) => delete result.output), | ||
| ], | ||
| [ | ||
| "missing instructions", | ||
| () => runnerOutputJson((result) => delete result.instructions), | ||
| ], | ||
| [ | ||
| "non-number instructions", | ||
| () => runnerOutputJson((result) => (result.instructions = "4423")), | ||
| ], | ||
| [ | ||
| "missing memory usage", | ||
| () => runnerOutputJson((result) => delete result.memory_usage), | ||
| ], | ||
| [ | ||
| "non-number memory usage", | ||
| () => runnerOutputJson((result) => (result.memory_usage = "1088")), | ||
| ], | ||
| ["missing size", () => runnerOutputJson((result) => delete result.size)], | ||
| [ | ||
| "non-number size", | ||
| () => runnerOutputJson((result) => (result.size = "49")), | ||
| ], | ||
| ])( |
Collaborator
There was a problem hiding this comment.
Nice! really like this format.
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
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.
The function-runner returns performance metadata like instruction count, memory used, and module size. This PR adds these fields under
metadataon the run result so that developers can easily read and optimize for these values.