Omnipotent/omniscient tracing core for debugging clojure(script)
very early alpha, api is still unstable but its only for dev time so there shouldn't be any problems
or just through github source:
:deps {omni_trace/omni_trace {:git/url "https://github.com/Cyrik/omni-trace"
:sha "5def7f9ad31d703317e5be5e64a57322e1c89eed"}}
(ns user
(:require [omni-trace.omni-trace :as o]
[omni-trace.testing-ns :as e]
[omni-trace.flamegraph :as flame]
[portal.web :as p]))
(comment
;instrument a namespace
(o/instrument-ns 'omni-trace.testing-ns)
;run functions in that namespace
(-> e/machine-init
(e/insert-coin :quarter)
(e/insert-coin :dime)
(e/insert-coin :nickel)
(e/insert-coin :penny)
(e/press-button :a1)
(e/retrieve-change-returned))
;look at traces for every function that was traced
@o/workspace
;connect to portal
(def portal (p/open))
(add-tap #'p/submit)
;send the trace to portal as a vegajs flamegraph
(tap> (flame/flamegraph (flame/flamedata @o/workspace)))
;remove tracing from a namesapce
(o/uninstrument-ns 'omni-trace.testing-ns))
Can you improve this documentation? These fine people already did:
Lukas Domagala & The AlchemistEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close