tabular reporting
hiredman opened this issue · 4 comments
it would be nice to have tabular reporting via doric or clojure.pprint
or maybe it would be better to doc/have examples of calling criterium and getting the data back instead of printing out reports, something with the convenience of quick-bench but returning the data
(defmacro quick-bench
[expr & opts]
(let [[report-options options] (bench/extract-report-options opts)]
`(bench/quick-benchmark
~expr
(merge {:overhead (bench/estimatated-overhead)}
~(when (seq options) (apply hash-map options))))))
the above is just criterium's quick-bench minus the printing reporting, so you get the map back and do whatever reporting
I think we can push the overhead estimation into benchmark*
so that you can directly use benchmark
and quick-benchmark
to get data based results. Does https://github.com/hugoduncan/criterium/tree/feature/bench-data satisfy this?
Doric produces nice output, but I think I would prefer to not have it as a dependency.
that's great, thanks