I want to get the results of the time macro call in order to collect several measurements and process them. I tried the locally setf standard output and redirected it to a string, but it did not work with the time macro. This may be wrong, but I tried:
(with-output-to-string (str) (let ((*standard-output* str)) (time (test-with-size 40))))
Questions:
- Is there a way to capture the output of
time ? - If not, can I capture the output of the
slime-profile-report command? - If none of the above works, how can I measure the time spent evaluating an arbitrary expression?
I want to measure the execution time of an algorithm as the input size increases for each input size (from 1 to 100). I will measure many times and keep the average value. Then I want to build the results. The continuity is simple, and I found many ways in Cliki, but how can I collect the results?
I use CLISP and CCL.
EDIT: Paul Nathan pointed out that the time macro outputs to *trace-output* , which is the solution. I would like to get a more pleasant and simple solution, because with this I have to deal with implementation-specific tracing.
Paralife
source share