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