janet-profiling -- measure duration of execution #714
saikyun
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to be able to measure execution time in a more structured way than
test/timeit, so I made janet-profiling.It's inspired by tufte. Main features include:
Example usage:
The rows prefixed by
:allis a summary of all measurements with that label, which means that if an inner measurement with the same label is in multiple places, it will show up in both the nested way (like :inner does in this case), and in:all/inner. This way you can see if a measurement is slower in a specific context, or just all around.There's also
defnp/varfnpwhich work likedefn/varfnexcept that the body is wrapped with(p <function-name> (do body)).<-means "same as the value to the left", in these cases because of no inner measurements having been done.Hope you find use for it. :) Happy for any feedback.
Beta Was this translation helpful? Give feedback.
All reactions