mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-11 15:15:57 +01:00
Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches
This commit is contained in:
27
nyquist/profile.lsp
Normal file
27
nyquist/profile.lsp
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
; profile.lsp -- support for profiling
|
||||
|
||||
;## show-profile -- print profile data
|
||||
(defun show-profile ()
|
||||
(let ((profile-flag (profile nil)) (total 0))
|
||||
(dolist (name *PROFILE*)
|
||||
(setq total (+ total (get name '*PROFILE*))))
|
||||
(dolist (name *PROFILE*)
|
||||
(format t "~A (~A%): ~A~%"
|
||||
(get name '*PROFILE*)
|
||||
(truncate
|
||||
(+ 0.5 (/ (float (* 100 (get name '*PROFILE*)))
|
||||
total)))
|
||||
name))
|
||||
(format t "Total: ~A~%" total)
|
||||
(profile profile-flag)))
|
||||
|
||||
|
||||
;## start-profile -- clear old profile data and start profiling
|
||||
(defun start-profile ()
|
||||
(profile nil)
|
||||
(dolist (name *PROFILE*)
|
||||
(remprop name '*PROFILE*))
|
||||
(setq *PROFILE* nil)
|
||||
(profile t))
|
||||
|
||||
Reference in New Issue
Block a user