Created
November 10, 2020 08:01
-
-
Save arnaudbos/15ba894286ac4f90f01c667b872da816 to your computer and use it in GitHub Desktop.
[clj] Combine bench and profiling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clj-async-profiler.core :as prof] '[criterium.core :as bench]) | |
(prof/profile {:return-file true} | |
(bench/bench | |
(merge {:a 1} {:b 2}))) | |
; Execution time mean : 284.172365 ns | |
; /tmp/clj-async-profiler/results/03-cpu-flamegraph.svg | |
(prof/profile {:return-file true} | |
(bench/bench | |
(into {:a 1} {:b 2}))) | |
; Execution time mean : 323.373109 ns | |
; /tmp/clj-async-profiler/results/04-cpu-flamegraph.svg |
Author
arnaudbos
commented
Nov 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment