Closed avocade closed 1 year ago
As a workaround, you could have also done it like this:
(.bindRoot #'clj-async-profiler.core/temp-directory
(let [output-dir (or (System/getenv "CLJ_ASYNC_PROFILER_OUTPUT_DIR") "/tmp")
root (io/file output-dir "clj-async-profiler")]
(.mkdirs (io/file root "results"))
(.mkdirs (io/file root "internal"))
root))
Basically, the same code but you execute it before using clj-async-profiler, so you don't need to build a fork.
Regarding the customization, I can make it configurable through a Java property, say clj-async-profiler.output-dir
, would that work?
Instead of hardcoded /tmp, which doesn't really work on some machines (like on Fly.io).