Skip to content

Follow-up from "Add duration analysis section to master broken incidents"

The following discussions from !2569 (merged) should be addressed:

  • @rymai started a discussion:

    suggestion (non-blocking): In the future, it would be nice to use a dedicated class for this, e.g.

            result << KnapsackCombinedReport.new(spec_file: spec, expected: knapsack_expected_durations[spec]&.to_f, actual: actual_duration.to_f)
          end
  • @rymai started a discussion:

          knapsack_actual_durations.each_with_object([]) do |(spec, actual_duration), result|
  • @rymai started a discussion:

            @combined_knapsack_reports = combined_knapsack_reports || []
  • @rymai started a discussion:

    suggestion: Then we would defer #diff_percentage to the KnapsackCombinedReport objects (we could even generate the Markdown table directly from the class):

            table_body = combined_knapsack_reports.map do |combined_knapsack_report|
              "|#{combined_knapsack_report.spec_file}|#{combined_knapsack_report.expected}|#{combined_knapsack_report.actual}|#{combined_knapsack_report.diff_percentage}|"