fixing combined charts issue
parent
d830194d29
commit
f8a01ef70a
|
@ -54,7 +54,7 @@ def run_agent(
|
||||||
output = process.stdout.readline()
|
output = process.stdout.readline()
|
||||||
print(output.strip())
|
print(output.strip())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Error reading stdout", e)
|
continue
|
||||||
|
|
||||||
# Check if process has ended, has no more output, or exceeded timeout
|
# Check if process has ended, has no more output, or exceeded timeout
|
||||||
if process.poll() is not None or (time.time() - start_time > timeout):
|
if process.poll() is not None or (time.time() - start_time > timeout):
|
||||||
|
|
|
@ -19,7 +19,9 @@ def generate_combined_chart() -> None:
|
||||||
|
|
||||||
reports_data = get_reports_data(str(all_agents_path))
|
reports_data = get_reports_data(str(all_agents_path))
|
||||||
|
|
||||||
categories = all_agent_categories(reports_data, combined=True)
|
categories = all_agent_categories(reports_data)
|
||||||
|
|
||||||
|
print("Agent categories:", categories)
|
||||||
|
|
||||||
# Count the number of directories in this directory
|
# Count the number of directories in this directory
|
||||||
num_dirs = len([f for f in combined_charts_folder.iterdir() if f.is_dir()])
|
num_dirs = len([f for f in combined_charts_folder.iterdir() if f.is_dir()])
|
||||||
|
|
|
@ -31,16 +31,13 @@ def get_reports_data(report_path: str) -> dict[str, Any]:
|
||||||
return reports_data
|
return reports_data
|
||||||
|
|
||||||
|
|
||||||
def get_agent_category(
|
def get_agent_category(report: Report) -> dict[str, Any]:
|
||||||
report: Report, combined: Optional[bool] = None
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
categories: dict[str, Any] = {}
|
categories: dict[str, Any] = {}
|
||||||
|
|
||||||
def get_highest_category_difficulty(data: Test) -> None:
|
def get_highest_category_difficulty(data: Test) -> None:
|
||||||
for category in data.category:
|
for category in data.category:
|
||||||
if category == "interface" or category == "iterate":
|
if category == "interface" or category == "iterate":
|
||||||
continue
|
continue
|
||||||
if combined:
|
|
||||||
categories.setdefault(category, 0)
|
categories.setdefault(category, 0)
|
||||||
if data.metrics.success:
|
if data.metrics.success:
|
||||||
num_dif = STRING_DIFFICULTY_MAP[data.metrics.difficulty]
|
num_dif = STRING_DIFFICULTY_MAP[data.metrics.difficulty]
|
||||||
|
@ -57,13 +54,11 @@ def get_agent_category(
|
||||||
return categories
|
return categories
|
||||||
|
|
||||||
|
|
||||||
def all_agent_categories(
|
def all_agent_categories(reports_data: dict[str, Any]) -> dict[str, Any]:
|
||||||
reports_data: dict[str, Any], combined: Optional[bool] = None
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
all_categories: dict[str, Any] = {}
|
all_categories: dict[str, Any] = {}
|
||||||
|
|
||||||
for name, report in reports_data.items():
|
for name, report in reports_data.items():
|
||||||
categories = get_agent_category(report, combined)
|
categories = get_agent_category(report)
|
||||||
all_categories[name] = categories
|
all_categories[name] = categories
|
||||||
|
|
||||||
return all_categories
|
return all_categories
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 646f33a761d8332821aeb4a5dc167b619d907c50
|
Subproject commit b0318053b6cbe357f2e020fe0f1275a2cb3da767
|
Loading…
Reference in New Issue