Switch to logbook for collecting results
This commit is contained in:
parent
bddd38ad08
commit
39e4782825
9
Makefile
9
Makefile
|
@ -1,9 +1,6 @@
|
||||||
all: tmp.csv
|
all:
|
||||||
|
raco make internal-latency.rkt
|
||||||
|
PLTSTDERR=warning racket internal-latency.rkt
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f tmp.csv
|
|
||||||
rm -rf compiled
|
rm -rf compiled
|
||||||
|
|
||||||
tmp.csv:
|
|
||||||
raco make internal-latency.rkt
|
|
||||||
PLTSTDERR=warning racket internal-latency.rkt | tee $@
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
(require racket/match)
|
(require racket/match)
|
||||||
(require minimart)
|
(require minimart)
|
||||||
|
(require logbook)
|
||||||
|
|
||||||
(struct ping (src dst timestamp) #:transparent)
|
(struct ping (src dst timestamp) #:transparent)
|
||||||
|
|
||||||
|
@ -65,8 +66,14 @@
|
||||||
|
|
||||||
(module+ main
|
(module+ main
|
||||||
(define t 5000)
|
(define t 5000)
|
||||||
(printf "Num echoers,Run duration (ms),Boot delay (ms),Num roundtrips,Msgs/sec,Sec/msg\n")
|
(define E (standard-logbook-entry (default-logbook #:verbose? #t) "minimart"))
|
||||||
(flush-output)
|
(define T (logbook-table E "internal-latency"
|
||||||
|
#:column-spec '(number-of-echoers
|
||||||
|
secs/msg
|
||||||
|
msgs/sec
|
||||||
|
boot-delay-ms
|
||||||
|
roundtrip-count
|
||||||
|
run-duration-ms)))
|
||||||
;; Warmup
|
;; Warmup
|
||||||
(let ()
|
(let ()
|
||||||
(run #:echoer-count 1 #:run-time 1000)
|
(run #:echoer-count 1 #:run-time 1000)
|
||||||
|
@ -82,5 +89,9 @@
|
||||||
(collect-garbage)
|
(collect-garbage)
|
||||||
(collect-garbage)
|
(collect-garbage)
|
||||||
(define-values (count v boot-delay-ms) (run #:echoer-count n #:run-time t))
|
(define-values (count v boot-delay-ms) (run #:echoer-count n #:run-time t))
|
||||||
(printf "~a,~a,~a,~a,~a,~a\n" n t boot-delay-ms count v (/ 1.0 v))
|
(write-logbook-datum! T (list n
|
||||||
(flush-output)))
|
(/ 1.0 v)
|
||||||
|
v
|
||||||
|
boot-delay-ms
|
||||||
|
count
|
||||||
|
t))))
|
||||||
|
|
Loading…
Reference in New Issue