Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update README for 0.1.2 functions

  • Loading branch information...
commit d7cd3fabea47038818f491e03f403fd874c101e3 1 parent df30612
Sun Ning authored
Showing with 26 additions and 1 deletion.
  1. +26 −1 README.md
View
27 README.md
@@ -8,6 +8,8 @@ Timing is a simple library to log call time using perf4j.
[timing "0.1.2"]
```
+### timed
+
Just wrap forms you want to calculate call time:
```clojure
@@ -23,8 +25,31 @@ Timing will select a logging provider automatically by looking up your
classpath (slf4j, log4j and stderr). Timing doesn't depend on any
logging provider at compile time.
+### timed-fn
+
+Convert a predefined function to a timed one.
+
+```clojure
+(defn count-how-many-people-on-the-earth [req]
+ )
+
+(defroute my-website
+ (GET "/count" (timed-fn count-how-many-people-on-the-earth)))
+```
+
+### defn-timed
+
+Define a function who is born to be timed.
+
+```clojure
+(defn-timed count-how-many-ants-on-the-earth [req]
+ )
+```
+
+### wrap-timed
+
There's also a built-in ring middleware to log call time for every
-request.
+request. `wrap-timed` uses uri as timing tags.
```clojure
(wrap-timed handler)
Please sign in to comment.
Something went wrong with that request. Please try again.