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:
|
||||
rm -f tmp.csv
|
||||
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 minimart)
|
||||
(require logbook)
|
||||
|
||||
(struct ping (src dst timestamp) #:transparent)
|
||||
|
||||
|
@ -65,8 +66,14 @@
|
|||
|
||||
(module+ main
|
||||
(define t 5000)
|
||||
(printf "Num echoers,Run duration (ms),Boot delay (ms),Num roundtrips,Msgs/sec,Sec/msg\n")
|
||||
(flush-output)
|
||||
(define E (standard-logbook-entry (default-logbook #:verbose? #t) "minimart"))
|
||||
(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
|
||||
(let ()
|
||||
(run #:echoer-count 1 #:run-time 1000)
|
||||
|
@ -82,5 +89,9 @@
|
|||
(collect-garbage)
|
||||
(collect-garbage)
|
||||
(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))
|
||||
(flush-output)))
|
||||
(write-logbook-datum! T (list n
|
||||
(/ 1.0 v)
|
||||
v
|
||||
boot-delay-ms
|
||||
count
|
||||
t))))
|
||||
|
|
Loading…
Reference in New Issue