Skip to content

Commit

Permalink
Update plotting utils to depict different performance targets
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffxy committed Apr 18, 2024
1 parent 08ae1f3 commit 3b8ac6c
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tools/plots/e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,11 @@ def print_olap_costs_per_region(
print()


# pylint: disable-next=dangerous-default-value
def get_e2e_axes(
size: Literal["small", "large"],
txn_ceiling_ms=30.0,
ana_ceiling_s=30.0,
txn_ceiling_ms=[(30.0, (0.0, 1.0))],
ana_ceiling_s=[(30.0, (0.0, 1.0))],
custom_subplots: Optional[
Callable[[GridSpec], Tuple[plt.Axes, plt.Axes, plt.Axes]]
] = None,
Expand All @@ -436,12 +437,18 @@ def get_e2e_axes(
fig.align_ylabels()

# Transaction Latency ceiling
txn_ax.axhspan(ymin=0, ymax=txn_ceiling_ms, color="#000", alpha=0.05)
txn_ax.axhline(y=txn_ceiling_ms, color="#000", alpha=0.5, lw=1.5)
for ceiling, (xmin, xmax) in txn_ceiling_ms:
txn_ax.axhspan(
ymin=0, ymax=ceiling, xmin=xmin, xmax=xmax, color="#000", alpha=0.05
)
txn_ax.axhline(y=ceiling, xmin=xmin, xmax=xmax, color="#000", alpha=0.5, lw=1.5)

# OLAP Latency ceiling
ana_ax.axhspan(ymin=-5, ymax=ana_ceiling_s, color="#000", alpha=0.05)
ana_ax.axhline(y=ana_ceiling_s, color="#000", alpha=0.5, lw=1.5)
for ceiling, (xmin, xmax) in ana_ceiling_s:
ana_ax.axhspan(
ymin=-5, ymax=ceiling, xmin=xmin, xmax=xmax, color="#000", alpha=0.05
)
ana_ax.axhline(y=ceiling, xmin=xmin, xmax=xmax, color="#000", alpha=0.5, lw=1.5)

cst_ax.set_ylabel("Monthly\nCost ($)")
cst_ax.set_xlabel("Time Elapsed (minutes)")
Expand Down

0 comments on commit 3b8ac6c

Please sign in to comment.