A Clojure library to find latency across measurement points in single-threaded call trees.
Sample output:
| :name | :cumulative | :cumul-% | :individual | :indiv-% | :thrown? |
|-----------------+-------------+----------+-------------+----------+---------------------|
| outer | 357.82 ms | 100.00 % | 103.037 ms | 28.80 % | |
| inner | 204.407 ms | 57.13 % | 150.723 ms | 42.12 % | java.lang.Exception |
| inner-most | 53.684 ms | 15.00 % | 53.684 ms | 15.00 % | |
| inner-sibling | 50.376 ms | 14.08 % | 50.376 ms | 14.08 % | |
Leiningen coordinates: [espejito "0.2.0-alpha1"]
(:require [espejito.core :as e])
Wrap your outer-most layer with the following call
(e/report e/print-table
...) ; body of code
(e/measure "layer-name"
...) ; body of code to measure
The measure calls can be spread across several namespaces. Make sure that the layer-name is unique for every measurement point.
This library assumes single-threaded code path only. For new/other threads you must use separate report
for those
threads.
Copyright © 2015-2019 Shantanu Kumar
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close