Easy access to profiling

This commit is contained in:
Tony Garnock-Jones 2018-05-01 17:34:34 +01:00
parent 32d217f3e0
commit 65b2c94161

View file

@ -34,7 +34,7 @@
(define (signal-background-activity! delta)
(ground-enqueue! delta))
(define (run-ground boot-proc)
(define (run-ground* boot-proc)
(define ch (make-async-channel))
(parameterize ((current-ground-event-async-channel ch))
(define ground-event-relay-actor #f)
@ -74,3 +74,10 @@
(loop)]
[else
(sync (handle-evt ground-event-relay-evt (lambda _ (loop))) (system-idle-evt))]))))
(define (run-ground boot-proc)
(if (equal? (getenv "SYNDICATE_PROFILE") "ground")
(let ()
(local-require profile)
(profile (run-ground* boot-proc)))
(run-ground* boot-proc)))