Skip to content

Commit 49c06ba

Browse files
committed
update
1 parent e739d49 commit 49c06ba

File tree

1 file changed

+4
-41
lines changed

1 file changed

+4
-41
lines changed

utils/consolidated_test_report.py

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -318,36 +318,15 @@ def consolidate_reports(reports_dir):
318318
suite_durations[suite_name] = 0
319319
suite_durations[suite_name] += test["duration"]
320320

321-
# Create duration categories
322-
duration_categories = {
323-
"under_1s": 0,
324-
"1s_to_5s": 0,
325-
"5s_to_10s": 0,
326-
"10s_to_30s": 0,
327-
"over_30s": 0
328-
}
329-
330-
for test in all_slow_tests:
331-
duration = test["duration"]
332-
if duration < 1:
333-
duration_categories["under_1s"] += 1
334-
elif duration < 5:
335-
duration_categories["1s_to_5s"] += 1
336-
elif duration < 10:
337-
duration_categories["5s_to_10s"] += 1
338-
elif duration < 30:
339-
duration_categories["10s_to_30s"] += 1
340-
else:
341-
duration_categories["over_30s"] += 1
321+
# Removed duration categories
342322

343323
return {
344324
"total_stats": total_stats,
345325
"test_suites": results,
346326
"slowest_tests": top_slowest_tests,
347327
"duration_stats": {
348328
"total_duration": total_duration,
349-
"suite_durations": suite_durations,
350-
"duration_categories": duration_categories
329+
"suite_durations": suite_durations
351330
}
352331
}
353332

@@ -382,22 +361,7 @@ def generate_report(consolidated_data):
382361
report.append(tabulate(summary_table, tablefmt="pipe"))
383362
report.append("")
384363

385-
# Add duration distribution if available
386-
duration_categories = duration_stats.get("duration_categories")
387-
if duration_categories:
388-
report.append("### Test Duration Distribution")
389-
390-
distribution_table = [
391-
["Duration Range", "Number of Tests"],
392-
["Under 1s", duration_categories.get("under_1s", 0)],
393-
["1s to 5s", duration_categories.get("1s_to_5s", 0)],
394-
["5s to 10s", duration_categories.get("5s_to_10s", 0)],
395-
["10s to 30s", duration_categories.get("10s_to_30s", 0)],
396-
["Over 30s", duration_categories.get("over_30s", 0)],
397-
]
398-
399-
report.append(tabulate(distribution_table, headers="firstrow", tablefmt="pipe"))
400-
report.append("")
364+
# Removed duration distribution section
401365

402366
# Add test suites summary
403367
report.append("## Test Suites")
@@ -435,8 +399,7 @@ def generate_report(consolidated_data):
435399
# Add slowest tests section
436400
slowest_tests = consolidated_data.get("slowest_tests", [])
437401
if slowest_tests:
438-
num_slowest = len(slowest_tests)
439-
report.append(f"## Slowest {num_slowest} Tests")
402+
report.append("## Slowest Tests")
440403

441404
slowest_table = [["Rank", "Test", "Duration (s)", "Test Suite"]]
442405
for i, test in enumerate(slowest_tests, 1):

0 commit comments

Comments
 (0)