Dr Rama Lakshmanan
Dr Rama Lakshmanan

Reputation: 67

Require Common Lisp Timing Function That Can Write to a Stream

I have always used the Common Lisp time macro for checking the speed of an implementation. However, I would like to be able to write the timing output to a stream (file) so that I can do some statistical analysis on it or to filter it in some way.

So far I have not found any commands or libraries that make this possible for me. I would greatly appreciate assistance with this.

Upvotes: 2

Views: 114

Answers (1)

Rainer Joswig
Rainer Joswig

Reputation: 139261

(with-open-file (*trace-output* "/tmp/time.text"
                 :direction :output)
  (time (sleep 1)))

Upvotes: 8

Related Questions