Hi, I just worked on timing clojure function calls. As you know, the built-in (time) macro is pretty good. But there's even better solutions in Java, called perf4j. perf4j logs call time with a configurable logger. And you can use log4j appenders to aggregate the data into some sorts of reports.

Then I created this library called "timing" that wraps perf4j, and to be clojure friendly. With timing, you can define a function that to be timed:

(defn-timed look-up-something-from-the-moon []
 ...)

or wrap a predefined function to be a timed one:

(let [timed-flight (timed-fn fly-me-to-the-moon)]
  (timed-flight...))

or just wrap a sets of forms:

(timed "the-timer-tag"
  (look-up ...)
  (look-up-again ...)
  ...)

You can find more information on the github page: https://github.com/sunng87/timing
and perf4j developer guide: http://perf4j.codehaus.org/devguide.html

Let me know if you have any ideas or questions.

--
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