Add doom/toggle-profiler

This commit is contained in:
Henrik Lissner 2017-06-18 23:37:58 +02:00
parent 96998e40d3
commit 7029d287e5
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -79,3 +79,13 @@ selection of all minor-modes, active or not."
(warn "Something went wrong.\n\n%s" (pp-to-string status))
(message "Your trust roots are set up properly.\n\n%s" (pp-to-string status))
t)))))
(defvar doom--profiler nil)
;;;###autoload
(defun doom/toggle-profiler ()
(interactive)
(if (not doom--profiler)
(profiler-start 'cpu+mem)
(profiler-report)
(profiler-stop))
(setq doom--profiler (not doom--profiler)))