Hi,

I am new to learning clojure, and I am hoping there is a solution to
something that is not obvious to me ... I have a function that I want
to run multiple times, measure the time it takes to execute each
function, and put those numbers in a vector. I would like to process
that vector further by doing things like max, min and average, and I
think I can do that fairly "easily", but I'm having trouble generating
such a vector in the first place.

For instance when I do this:

=> (dorun (repeatedly 3 myfunc))

I get

"Elapsed time: 1253.764 msecs"
"Elapsed time: 20003.997 msecs"
"Elapsed time: 653.919 msecs"
nil

I would like to get something like
[1253.764 200003.997 653.919], which I can post-process.

I tried a

=> (conj [] (dorun (repeatedly 3 myfunc)))

but that just gives me a [nil].

Can anyone help?

Thanks ...

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to