Function: cider-profile-toggle
cider-profile-toggle is an autoloaded, interactive and byte-compiled
function defined in cider-profile.el.
Signature
(cider-profile-toggle QUERY)
Documentation
Toggle profiling for a var.
Defaults to the symbol at point. With a prefix arg QUERY, or when there is no symbol at point, prompt for the var.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-profile.el
;;;###autoload
(defun cider-profile-toggle (query)
"Toggle profiling for a var.
Defaults to the symbol at point. With a prefix arg QUERY, or when there is
no symbol at point, prompt for the var."
(interactive "P")
(let ((toggle
(lambda (sym)
(let ((ns (cider-current-ns)))
(cider-nrepl-send-request
`("op" "cider/profile-toggle-var"
"ns" ,ns
"sym" ,sym)
(cider-profile--make-response-handler
(lambda (value)
(pcase value
("profiled" (message "Profiling enabled for %s/%s" ns sym))
("unprofiled" (message "Profiling disabled for %s/%s" ns sym))))))))))
(if-let* ((sym (and (not query) (cider-symbol-at-point))))
(funcall toggle sym)
(cider-read-symbol-name "Toggle profiling for var: " toggle))))