uncount
uncount( [s_function... |t] ) =>g_result
Description
Turns off counting and returns the current count results. This is an nlambda function.
count allows you to count the number of times a function has been called. count and uncount measure function call frequency and also serve as a valuable debugging aid. Both count and uncount accept more than one function argument, or t for counting/uncounting all functions.
To examine the number of times a function has been counted, call the uncount function. A list containing the number of times each function was called, along with the function name, is returned in the form of a list of (number functionName) pairs, such as,
((20 plus) (10 times) (5 greaterp))
The sublists are sorted by their first elements, using sortcar, so the most frequently executed functions always appear at the head of the list.
Arguments
Value Returned
|
List containing the number of times each function was called, along with the function name. |
Examples
count( plus greaterp ) ; Counts plus and greaterp
setq( x plus( 2 3 )) ; Use the functions being counted.
uncount( plus greaterp)
=> ((1 plus)(0 greaterp)) ; Number of times each
; function was called.
Related Topics
Return to top