Skip to content

Performance Testing

During development of code, a Function call or expression execution time can be quickly evaluated using the Clojure REPL, guiding an appropriate design choice.

NOTE: only test the functions that are known to be on the more critical paths of the system

The critical path of any production system should be checked for performance (or the first place to start when addressing performance issues).

Profile the performance of your system before investing significant time optimising performance, to ensure that time provides the most value.

Ensure a system can handle the expected load by simulating significant numbers of users.

Function call

Test individual expressions through to application and load testing one or more services.

  • time - rough results of evaluating an expression (Clojure standard library)
  • time+ a repeating version of time to warm up the JVM and give better results (Community Library)
  • criterion - a realistic measure of performance (Community Library)

Profile a system

Clojure Goes Fast: clj-async-profiler provides an interactive flame graph to identify critical paths and performance issues.

Clojure Goes Fast: docs and tools

Load Testing

Test a system can handle (twice or three times) the expected load using load test tools.

  • Gatling - open source & commercial load test tool for web applications
  • clj-gatling a Clojure wrapper to express tests in Clojure

Java Host

VisualVM provides lightweight profiling capabilities for development and runtime use.

More information to come soon