Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions scarab_stats/scarab_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ def retrieve_stats(self, config: List[str], stats: List[str], workload: List[str
available_workloads = set(self.data[self.data["stats"] == "Workload"].iloc[0][3:])
available_configs = set(self.data[self.data["stats"] == "Configuration"].iloc[0][3:])

# Check if stats exist, and if not, check for <stat>_count variants
validated_stats = []
available_stats = set(self.data["stats"].values)
for stat in stats:
if stat in available_stats:
validated_stats.append(stat)
elif f"{stat}_count" in available_stats:
validated_stats.append(f"{stat}_count")
else:
print(f"WARNING: Stat '{stat}' not found in dataframe, and '{stat}_count' not found either. Skipping.")

stats = validated_stats

# Validate workloads
missing_workloads = set(workload) - available_workloads

Expand Down
3 changes: 2 additions & 1 deletion sci
Original file line number Diff line number Diff line change
Expand Up @@ -2830,7 +2830,8 @@ def run_visualize(descriptor_name: str) -> int:
missing_stats: Set[str] = set()
if available_stats:
missing_stats = {stat for stat in resolved_stats if stat not in available_stats}
if missing_stats:

if missing_stats and any({stat+ "_count" not in available_stats for stat in resolved_stats}):
print(
f"Skipping {stats_list}: not present in collected stats "
f"({', '.join(sorted(missing_stats))})."
Expand Down
Loading