diff --git a/scheme/httpd/surflets/web-server/root/surflets/admin-profiling.scm b/scheme/httpd/surflets/web-server/root/surflets/admin-profiling.scm index b032bd6..5833abb 100644 --- a/scheme/httpd/surflets/web-server/root/surflets/admin-profiling.scm +++ b/scheme/httpd/surflets/web-server/root/surflets/admin-profiling.scm @@ -10,6 +10,7 @@ locks let-opt receiving + primitives ) (begin @@ -206,7 +207,6 @@ plot '~a' title 'Servlet Profiling ~a' with lines" (state:file-names-to-delete state))))) (define (delete-files state) - (format #t "running delete-files with state ~a~%" (state:file-names-to-delete state)) (let ((file-names-to-delete (state:file-names-to-delete state))) (if file-names-to-delete (for-each delete-filesys-object file-names-to-delete)))) @@ -235,6 +235,8 @@ plot '~a' title 'Servlet Profiling ~a' with lines" (set! gnuplot (search-gnuplot)) (set-servlet-data! (make-state #f #f 0)) (reset-profiling-state!) + ;; Remove state files if user did not do it. + (add-finalizer! (get-servlet-data) delete-files) (profile req)) (define (search-gnuplot)