Skip to content

Commit

Permalink
feat(eval/inspect): plot histogram from latencies
Browse files Browse the repository at this point in the history
  • Loading branch information
qlonik committed May 2, 2024
1 parent f52b029 commit 61000a3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion evaluation/scripts/inspect-specific-results.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ def unpack_data(hostname, result_path):
)
cdf_data = np.sort(data.latency)

fig, (cumulative, seq_lat) = plt.subplots(nrows=1, ncols=2, figsize=(12.8, 4.8))
nrows = 1
ncols = 3
fig, (cumulative, seq_lat, distribution) = plt.subplots(
nrows=nrows,
ncols=ncols,
figsize=(ncols * 6.4, nrows * 4.8),
)

cumulative.plot(cdf_data, np.arange(cdf_data.size) / cdf_data.size)
cumulative.set_xlabel("response latency (ms)")
Expand All @@ -129,6 +135,10 @@ def unpack_data(hostname, result_path):
seq_lat.set_xlabel("request sequence number")
seq_lat.set_ylabel("response latency (ms)")

distribution.hist(data.latency, bins=100)
distribution.set_xlabel("response latency (ms)")
distribution.set_ylabel("number of requests")

fig.suptitle(title)

fig.savefig(
Expand Down

0 comments on commit 61000a3

Please sign in to comment.