mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-26 14:51:01 +08:00
Allow to graph results from TCP links at 100Gbps nicely.
This commit is contained in:
parent
9cdef8aa0c
commit
5f95e53e0f
@ -81,6 +81,7 @@ function generate_output_file()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Resetting output file $OUTPUT_FILE_TXT and $OUTPUT_FILE_CSV"
|
echo "Resetting output file $OUTPUT_FILE_TXT and $OUTPUT_FILE_CSV"
|
||||||
|
mkdir -p ${OUTPUT_DIR}
|
||||||
> $OUTPUT_FILE_TXT
|
> $OUTPUT_FILE_TXT
|
||||||
echo "$CSV_HEADER_LINE" > $OUTPUT_FILE_CSV
|
echo "$CSV_HEADER_LINE" > $OUTPUT_FILE_CSV
|
||||||
|
|
||||||
|
@ -5,11 +5,14 @@
|
|||||||
# and that locally there is the "results" folder.
|
# and that locally there is the "results" folder.
|
||||||
#
|
#
|
||||||
|
|
||||||
# configurable values:
|
# results for TCP:
|
||||||
INPUT_FILE_PUSHPULL_TCP_THROUGHPUT="results/pushpull_tcp_thr_results.csv"
|
INPUT_FILE_PUSHPULL_TCP_THROUGHPUT="results/pushpull_tcp_thr_results.csv"
|
||||||
|
INPUT_FILE_REQREP_TCP_LATENCY="results/reqrep_tcp_lat_results.csv"
|
||||||
|
TCP_LINK_GPBS=100
|
||||||
|
|
||||||
|
# results for INPROC:
|
||||||
INPUT_FILE_PUSHPULL_INPROC_THROUGHPUT="results/pushpull_inproc_thr_results.csv"
|
INPUT_FILE_PUSHPULL_INPROC_THROUGHPUT="results/pushpull_inproc_thr_results.csv"
|
||||||
INPUT_FILE_PUBSUBPROXY_INPROC_THROUGHPUT="results/pubsubproxy_inproc_thr_results.csv"
|
INPUT_FILE_PUBSUBPROXY_INPROC_THROUGHPUT="results/pubsubproxy_inproc_thr_results.csv"
|
||||||
INPUT_FILE_REQREP_TCP_LATENCY="results/reqrep_tcp_lat_results.csv"
|
|
||||||
|
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
@ -23,7 +26,7 @@ import numpy as np
|
|||||||
|
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
def plot_throughput(csv_filename, title, force_10gb_limits=False):
|
def plot_throughput(csv_filename, title, is_tcp=False):
|
||||||
message_size_bytes, message_count, pps, mbps = np.loadtxt(csv_filename, delimiter=',', unpack=True)
|
message_size_bytes, message_count, pps, mbps = np.loadtxt(csv_filename, delimiter=',', unpack=True)
|
||||||
|
|
||||||
fig, ax1 = plt.subplots()
|
fig, ax1 = plt.subplots()
|
||||||
@ -40,8 +43,8 @@ def plot_throughput(csv_filename, title, force_10gb_limits=False):
|
|||||||
ax2 = ax1.twinx() # instantiate a second axes that shares the same x-axis
|
ax2 = ax1.twinx() # instantiate a second axes that shares the same x-axis
|
||||||
ax2.set_ylabel('Throughput [Gb/s]', color=color)
|
ax2.set_ylabel('Throughput [Gb/s]', color=color)
|
||||||
ax2.semilogx(message_size_bytes, mbps / 1e3, label='Throughput [Gb/s]', marker='o')
|
ax2.semilogx(message_size_bytes, mbps / 1e3, label='Throughput [Gb/s]', marker='o')
|
||||||
if force_10gb_limits:
|
if is_tcp:
|
||||||
ax2.set_yticks(np.arange(0, 11, 1))
|
ax2.set_yticks(np.arange(0, TCP_LINK_GPBS + 1, TCP_LINK_GPBS/10))
|
||||||
ax2.tick_params(axis='y', labelcolor=color)
|
ax2.tick_params(axis='y', labelcolor=color)
|
||||||
ax2.grid(True)
|
ax2.grid(True)
|
||||||
|
|
||||||
@ -64,7 +67,7 @@ def plot_latency(csv_filename, title):
|
|||||||
|
|
||||||
# main
|
# main
|
||||||
|
|
||||||
plot_throughput(INPUT_FILE_PUSHPULL_TCP_THROUGHPUT, 'ZeroMQ PUSH/PULL socket throughput, TCP transport', force_10gb_limits=True)
|
plot_throughput(INPUT_FILE_PUSHPULL_TCP_THROUGHPUT, 'ZeroMQ PUSH/PULL socket throughput, TCP transport', is_tcp=True)
|
||||||
plot_throughput(INPUT_FILE_PUSHPULL_INPROC_THROUGHPUT, 'ZeroMQ PUSH/PULL socket throughput, INPROC transport')
|
plot_throughput(INPUT_FILE_PUSHPULL_INPROC_THROUGHPUT, 'ZeroMQ PUSH/PULL socket throughput, INPROC transport')
|
||||||
plot_throughput(INPUT_FILE_PUBSUBPROXY_INPROC_THROUGHPUT, 'ZeroMQ PUB/SUB PROXY socket throughput, INPROC transport')
|
plot_throughput(INPUT_FILE_PUBSUBPROXY_INPROC_THROUGHPUT, 'ZeroMQ PUB/SUB PROXY socket throughput, INPROC transport')
|
||||||
plot_latency(INPUT_FILE_REQREP_TCP_LATENCY, 'ZeroMQ REQ/REP socket latency, TCP transport')
|
plot_latency(INPUT_FILE_REQREP_TCP_LATENCY, 'ZeroMQ REQ/REP socket latency, TCP transport')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user