Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MattWellie committed Oct 30, 2024
1 parent 64c2b8c commit 8e94f76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/talos/CreateTalosHTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ def calculate_report_size(num_results: int, max_elements: int = MAX_REPORT_SIZE)
# calculate the number of samples per sub-report
samples_per_report = num_results // report_count

get_logger().info(f'Samples per report, before refinement: {samples_per_report}')

# adjust so that we don't make tiny little report HTMLs
if num_results % samples_per_report < MIN_REPORT_SIZE:
samples_per_report += MIN_REPORT_SIZE

get_logger().info(f'Samples per report, after refinement: {samples_per_report}')

return samples_per_report


Expand Down Expand Up @@ -148,6 +152,8 @@ def split_up(all_results: ResultData, max_elements: int = MAX_REPORT_SIZE) -> li
# get the number of samples to include in this report
samples_per_report = calculate_report_size(len(subset_of_cases.results), max_elements)

get_logger().info(f'{name} will be split into reports containing {samples_per_report} samples')

# split the data into sub-reports
for i, chunk in enumerate(chunks(list(subset_of_cases.results.keys()), samples_per_report), start=1):
sub_report = ResultData(
Expand Down

0 comments on commit 8e94f76

Please sign in to comment.