export function name and time to run#32
Open
Luis-Leao-rbcx wants to merge 3 commits into
Open
Conversation
… basically the same but the v2 the csv and json files are not deleted so we can inspect them
the performace exporter will print the function name and the time it takes for it to be executed.
MuddyHope
requested changes
Jun 16, 2025
MuddyHope
left a comment
Owner
There was a problem hiding this comment.
Can you pull the latest main ?
Also do look at one
| assert output.startswith("Function 'dummy_function' executed in ") | ||
|
|
||
| # Extract the ms part and check it's within reasonable range | ||
| match = re.search(r'executed in ([\d\.]+) ms', output) |
Owner
There was a problem hiding this comment.
Regex search becomes a costly operation.
|
|
||
| class BuiltinPerformanceExporter: | ||
| def __init__(self, output_func=print): | ||
| self.output_func = output_func |
Owner
There was a problem hiding this comment.
Can you implement something like this PR. #24
It has to be configurable via the main decorator.
Owner
|
Hi @Luis-Leao-rbcx, are you still working on this? |
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.
Like you asked "Instead of this, can you implement a built-in exporter that shows the function name and the time it takes for it to be executed?"
Note: I have idea why contributing.md shows changes, i didnt touch it.