Skip to content

Commit

Permalink
Check in plotting fix for CH-BenCHmark
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffxy committed May 16, 2024
1 parent fa2261a commit 919fd57
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/plots/e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

class RecordedRun:
@classmethod
def load(cls, exp_dir: str, is_trace: bool = False) -> "RecordedRun":
def load(
cls, exp_dir: str, is_trace: bool = False, ignore_txn_stats: bool = False
) -> "RecordedRun":
base = pathlib.Path(exp_dir)

if (base / "brad_metrics_front_end.log").exists():
Expand All @@ -35,7 +37,7 @@ def load(cls, exp_dir: str, is_trace: bool = False) -> "RecordedRun":
if not inner.is_dir() or not inner.name.startswith("t_"):
continue
clients = int(inner.name.split("_")[1])
oltp_stats, oltp_ind_lats = _load_txn_data(inner, clients)
oltp_stats, oltp_ind_lats = _load_txn_data(inner, clients, ignore_txn_stats)
if oltp_stats is not None:
stats.append(oltp_stats)
if oltp_ind_lats is not None:
Expand Down Expand Up @@ -533,7 +535,7 @@ def compute_cumulative_cost(minutes: npt.NDArray, monthly_costs: npt.NDArray) ->


def _load_txn_data(
data_dir: pathlib.Path, num_clients: int
data_dir: pathlib.Path, num_clients: int, ignore_txn_stats: bool
) -> Tuple[pd.DataFrame, pd.DataFrame]:
all_lats = []
all_stats = []
Expand Down Expand Up @@ -562,7 +564,7 @@ def _load_txn_data(
else:
comb_lats = None

if len(all_stats) > 0:
if not ignore_txn_stats and len(all_stats) > 0:
comb_stats = pd.concat(all_stats, ignore_index=True)
comb_stats = (
comb_stats.groupby("num_clients")
Expand Down

0 comments on commit 919fd57

Please sign in to comment.