mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-15 23:36:04 -05:00
Compare commits
2 commits
5176f1956f
...
c526d3dfb9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c526d3dfb9 | ||
|
|
3ffb581c28 |
4 changed files with 15 additions and 11 deletions
|
|
@ -16,7 +16,7 @@
|
||||||
(action
|
(action
|
||||||
(with-stdout-to
|
(with-stdout-to
|
||||||
%{targets}
|
%{targets}
|
||||||
(run ./run_hash.sh -d ../data/ --n-conn=2 -j=4))))
|
(run ./run_hash.sh -d ../data/ --n-conn=2))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(alias runtest)
|
(alias runtest)
|
||||||
|
|
@ -36,9 +36,12 @@
|
||||||
(= %{system} "linux")
|
(= %{system} "linux")
|
||||||
(>= %{ocaml_version} 5.0)))
|
(>= %{ocaml_version} 5.0)))
|
||||||
(action
|
(action
|
||||||
(with-stdout-to
|
(setenv
|
||||||
%{targets}
|
CI_MODE
|
||||||
(run ./run_echo.sh -n 10 --n-conn=2 -j=4))))
|
1
|
||||||
|
(with-stdout-to
|
||||||
|
%{targets}
|
||||||
|
(run ./run_echo.sh -n 10 --n-conn=2 -v)))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(alias runtest)
|
(alias runtest)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
module M_lwt = Moonpool_lwt
|
module M_lwt = Moonpool_lwt
|
||||||
module Trace = Trace_core
|
module Trace = Trace_core
|
||||||
|
|
||||||
|
let ci_mode = Option.is_some @@ Sys.getenv_opt "CI_MODE"
|
||||||
let spf = Printf.sprintf
|
let spf = Printf.sprintf
|
||||||
let await_lwt = Moonpool_lwt.await_lwt
|
let await_lwt = Moonpool_lwt.await_lwt
|
||||||
let ( let@ ) = ( @@ )
|
let ( let@ ) = ( @@ )
|
||||||
|
|
@ -68,9 +69,10 @@ let main ~port ~n ~n_conn ~verbose ~msg_per_conn () : unit =
|
||||||
|
|
||||||
Printf.printf "all done\n%!";
|
Printf.printf "all done\n%!";
|
||||||
let elapsed = Unix.gettimeofday () -. t0 in
|
let elapsed = Unix.gettimeofday () -. t0 in
|
||||||
Printf.printf " sent %d messages in %.4fs (%.2f msg/s)\n%!" !n_msg_total
|
if not ci_mode then
|
||||||
elapsed
|
Printf.printf " sent %d messages in %.4fs (%.2f msg/s)\n%!" !n_msg_total
|
||||||
(float !n_msg_total /. elapsed);
|
elapsed
|
||||||
|
(float !n_msg_total /. elapsed);
|
||||||
()
|
()
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
run echo server on port=12346
|
run echo server on port=12346
|
||||||
listening on port 12346
|
listening on port 12346
|
||||||
run echo client -p 12346 -n 10 --n-conn=2 -j=4
|
run echo client -p 12346 -n 10 --n-conn=2 -v
|
||||||
all done
|
all done
|
||||||
connecting to port 12346
|
connecting to port 12346 (10 msg per conn, 10 conns total, 2 max at a time)
|
||||||
read: hello 1
|
read: hello 1
|
||||||
read: hello 1
|
read: hello 1
|
||||||
read: hello 1
|
read: hello 1
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
running hash server on port=12345
|
running hash server on port=12345
|
||||||
listening on port 12345
|
listening on port 12345
|
||||||
listening on port=12345
|
run hash client -p 12345 -d ../data/ --n-conn=2
|
||||||
run hash client -p 12345 -d ../data/ --n-conn=2 -j=4
|
|
||||||
../data/d1/large: fdb479c5661572f9606266eeb280b4db5c26cc38
|
../data/d1/large: fdb479c5661572f9606266eeb280b4db5c26cc38
|
||||||
../data/d1/large: fdb479c5661572f9606266eeb280b4db5c26cc38
|
../data/d1/large: fdb479c5661572f9606266eeb280b4db5c26cc38
|
||||||
../data/d1/large_10: c31560efa1a5ad6dbf89990d51878f3bd64b13ce
|
../data/d1/large_10: c31560efa1a5ad6dbf89990d51878f3bd64b13ce
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue