Clojure Miniprofiler: A simple, but effective profiler for Clojure web apps

Clojure Miniprofiler: A simple, but effective profiler for Clojure web apps

Speed is the most important feature. If your application is slow, people won’t use it.

Fred Wilson

Speed is always important for your app. Clojure miniprofiler lets you find out what’s slow, in production with little effort.

Clojure is blazing fast most of the time. On the JVM it has access to a world-class compiler and runtime. However, sometimes you call out across the network, to databases, third party APIs and so on. Sometimes your code isn’t as effecient as it could be. Clojure Miniprofiler lets you figure out, both in production and development, what’s making a page slow.

What does it profile?

Any code you like in your web application. You wrap calls to databases, third party libraries etc in a simple macro, and miniprofiler will time those calls.

You can also time larger blocks of your code, creating a tree of profile results to let you know where your app is spending its time.

Clojure Miniprofiler also gathers timing information from the browser, so you can hunt down slow DNS lookups, slow https handshakes and so on.

When does it profile?

Clojure Miniprofiler is designed for both production and development use. In production, you should turn it on for administrators (there’s customization for that). There’s very little overhead when miniprofiler is disabled, so your customers won’t even notice.

In development, miniprofiler profiles all requests. This helps you catch performance problems before they hit production.

What does it look like?

How do I get started?

Get the jar from clojars and follow the Getting Started Guide.

The source is up on Github