Ver código fonte

profiling support using SLIMEs metering

Mark VandenBrink 12 anos atrás
pai
commit
f32f46b998
1 arquivos alterados com 14 adições e 0 exclusões
  1. 14 0
      profile.lisp

+ 14 - 0
profile.lisp

@@ -0,0 +1,14 @@
+(defun profile-on ()
+  (dolist (p '("MP4-ATOM" "MPEG" "AUDIO-STREAMS" "ID3-FRAME" "UTILS" "LOGGING" "ISO-639-2" "MP3-TAG" "MP4-TAG"))
+    (let ((pkg (find-package p)))
+      (mon:monitor-all pkg)
+      (format t "Package ~a, ~:d~%" pkg (length mon:*monitored-functions*)))))
+
+(defun profile-report ()
+  (mon:report :nested :inclusive :threshold 0.0 :names :all))
+
+(defun profile-reset ()
+  (mon:reset-all-monitoring))
+
+(defun profile-off ()
+  (mon:unmonitor))