Use time-apply rather than current-inexact-milliseconds
This commit is contained in:
parent
bfa04b3f13
commit
23d5036095
|
@ -26,11 +26,10 @@
|
|||
(gestalt-union (pub (presence id))
|
||||
(sub (presence ?) #:level 1))))
|
||||
|
||||
(define start-time (current-inexact-milliseconds))
|
||||
(run-ground (for/list [(id (in-range peer-count))] (peer id)))
|
||||
(define stop-time (current-inexact-milliseconds))
|
||||
(define delta (- stop-time start-time))
|
||||
(values routing-update-count delta))
|
||||
(define boot-actions (for/list [(id (in-range peer-count))] (peer id)))
|
||||
(define-values (results cpu-time wall-clock-time gc-time)
|
||||
(time-apply (lambda () (run-ground boot-actions)) '()))
|
||||
(values routing-update-count (max 1 (- cpu-time gc-time))))
|
||||
|
||||
(module+ main
|
||||
(define E (standard-logbook-entry (default-logbook #:verbose? #t) "minimart" "observe-all-minimart"))
|
||||
|
|
|
@ -26,11 +26,10 @@
|
|||
(pub (presence id))
|
||||
(sub (advertise (presence ?)))))
|
||||
|
||||
(define start-time (current-inexact-milliseconds))
|
||||
(run-ground (for/list [(id (in-range peer-count))] (peer id)))
|
||||
(define stop-time (current-inexact-milliseconds))
|
||||
(define delta (- stop-time start-time))
|
||||
(values routing-update-count delta))
|
||||
(define boot-actions (for/list [(id (in-range peer-count))] (peer id)))
|
||||
(define-values (results cpu-time wall-clock-time gc-time)
|
||||
(time-apply (lambda () (run-ground boot-actions)) '()))
|
||||
(values routing-update-count (max 1 (- cpu-time gc-time))))
|
||||
|
||||
(module+ main
|
||||
(define E (standard-logbook-entry (default-logbook #:verbose? #t) "minimart" "observe-all-prospect"))
|
||||
|
|
Loading…
Reference in New Issue