(* test throughput of network connection to sctl *) let pingtest () = let sctl = Sctl.create_local() in (* let sctl = Sctl.create_remote "127.0.0.1" 30000 in *) let numsteps = 500000 in let before_time = Unix.gettimeofday() in for i = 0 to numsteps do Sctl.ping sctl "FOOBARBAZFOOBARBAZ" done; let after_time = Unix.gettimeofday() in let diff_time = after_time -. before_time in Printf.printf "%f secs for %d steps. %f steps/sec\n" diff_time numsteps ((float numsteps) /.diff_time); flush stdout; Sctl.close sctl ;; pingtest()