swim protocol in ocaml interoperable with membership lib and serf cli

fix: correct throughput calculation to match memberlist (total/elapsed not avg per node)

Changed files
+3 -3
bench
+3 -3
bench/swim_throughput_parallel.sh
··· 83 83 exit 1 84 84 fi 85 85 86 - AVG_MPS=$(echo "scale=1; $TOTAL_MPS / $NODE_COUNT" | bc) 86 + TOTAL_THROUGHPUT=$(echo "scale=1; $TOTAL_RECV / $DURATION" | bc) 87 87 DURATION_NS=$(echo "$DURATION * 1000000000" | bc | cut -d. -f1) 88 88 CPU_CORES=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1) 89 89 ··· 96 96 "msg_rate": $MSG_RATE, 97 97 "broadcasts_sent": $TOTAL_SENT, 98 98 "broadcasts_received": $TOTAL_RECV, 99 - "msgs_per_sec": $AVG_MPS, 99 + "msgs_per_sec": $TOTAL_THROUGHPUT, 100 100 "cpu_cores": $CPU_CORES 101 101 } 102 102 EOF ··· 107 107 echo "Target Rate: ${MSG_RATE} msg/s per node" 108 108 echo "Broadcasts Sent: $TOTAL_SENT" 109 109 echo "Broadcasts Recv: $TOTAL_RECV" 110 - echo "Avg Throughput: $AVG_MPS msg/s" 110 + echo "Throughput: $TOTAL_THROUGHPUT msg/s" 111 111 echo "CPU Cores: $CPU_CORES" 112 112 fi