Executes body with *profile-data* bound to an atom of a new map.
Returns the raw profile data as a map. Keys in the map are profile
names (keywords), and values are lists of elapsed time, in
nanoseconds.
(defmacro with-profile-data
"Executes body with *profile-data* bound to an atom of a new map.
Returns the raw profile data as a map. Keys in the map are profile
names (keywords), and values are lists of elapsed time, in
nanoseconds."
[& body]
`(binding [*profile-data* (atom {})]
~@body
@*profile-data*))
Comments top
No comments for with-profile-data. Log in to add a comment.