use super::super::*;

pub(crate) const STRUCTURAL_BUDGETS: &[StructuralBudgetSpec] = &[
    // --- idle structural budgets ---
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_single_repo_60s",
        metric: "open_repos",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_single_repo_60s",
        metric: "tracked_files_per_repo",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_single_repo_60s",
        metric: "sample_count",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 60.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_single_repo_60s",
        metric: "sample_duration_ms",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 59_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_single_repo_60s",
        metric: "avg_cpu_pct",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 2.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_single_repo_60s",
        metric: "rss_delta_kib",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 1_024.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_ten_repos_60s",
        metric: "open_repos",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 10.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_ten_repos_60s",
        metric: "tracked_files_per_repo",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_ten_repos_60s",
        metric: "sample_count",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 60.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_ten_repos_60s",
        metric: "sample_duration_ms",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 59_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_ten_repos_60s",
        metric: "avg_cpu_pct",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 5.0,
    },
    StructuralBudgetSpec {
        bench: "idle/cpu_usage_ten_repos_60s",
        metric: "rss_delta_kib",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 4_096.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_single_repo_10min",
        metric: "open_repos",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_single_repo_10min",
        metric: "tracked_files_per_repo",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_single_repo_10min",
        metric: "sample_count",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 600.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_single_repo_10min",
        metric: "sample_duration_ms",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 599_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_single_repo_10min",
        metric: "avg_cpu_pct",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 2.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_single_repo_10min",
        metric: "rss_delta_kib",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 1_024.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_ten_repos_10min",
        metric: "open_repos",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 10.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_ten_repos_10min",
        metric: "tracked_files_per_repo",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_ten_repos_10min",
        metric: "sample_count",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 600.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_ten_repos_10min",
        metric: "sample_duration_ms",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 599_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_ten_repos_10min",
        metric: "avg_cpu_pct",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 5.0,
    },
    StructuralBudgetSpec {
        bench: "idle/memory_growth_ten_repos_10min",
        metric: "rss_delta_kib",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 4_096.0,
    },
    StructuralBudgetSpec {
        bench: "idle/background_refresh_cost_per_cycle",
        metric: "open_repos",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 10.0,
    },
    StructuralBudgetSpec {
        bench: "idle/background_refresh_cost_per_cycle",
        metric: "tracked_files_per_repo",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/background_refresh_cost_per_cycle",
        metric: "refresh_cycles",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 10.0,
    },
    StructuralBudgetSpec {
        bench: "idle/background_refresh_cost_per_cycle",
        metric: "repos_refreshed",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 100.0,
    },
    StructuralBudgetSpec {
        bench: "idle/background_refresh_cost_per_cycle",
        metric: "status_calls",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 100.0,
    },
    StructuralBudgetSpec {
        bench: "idle/background_refresh_cost_per_cycle",
        metric: "max_refresh_cycle_ms",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 100.0,
    },
    StructuralBudgetSpec {
        bench: "idle/wake_from_sleep_resume",
        metric: "open_repos",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 10.0,
    },
    StructuralBudgetSpec {
        bench: "idle/wake_from_sleep_resume",
        metric: "tracked_files_per_repo",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1_000.0,
    },
    StructuralBudgetSpec {
        bench: "idle/wake_from_sleep_resume",
        metric: "refresh_cycles",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "idle/wake_from_sleep_resume",
        metric: "repos_refreshed",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 10.0,
    },
    StructuralBudgetSpec {
        bench: "idle/wake_from_sleep_resume",
        metric: "status_calls",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 10.0,
    },
    StructuralBudgetSpec {
        bench: "idle/wake_from_sleep_resume",
        metric: "wake_resume_ms",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 250.0,
    },
    // --- scrollbar_drag_step structural budgets ---
    StructuralBudgetSpec {
        bench: "scrollbar_drag_step/window_200",
        metric: "steps",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "scrollbar_drag_step/window_200",
        metric: "thumb_metric_recomputes",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "scrollbar_drag_step/window_200",
        metric: "scroll_offset_recomputes",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "scrollbar_drag_step/window_200",
        metric: "viewport_h",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 800.0,
    },
    // The drag must reach both track boundaries during the oscillation.
    StructuralBudgetSpec {
        bench: "scrollbar_drag_step/window_200",
        metric: "clamp_at_top_count",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "scrollbar_drag_step/window_200",
        metric: "clamp_at_bottom_count",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    // Scroll position must sweep a meaningful range.
    StructuralBudgetSpec {
        bench: "scrollbar_drag_step/window_200",
        metric: "min_scroll_y",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 100.0,
    },
    StructuralBudgetSpec {
        bench: "scrollbar_drag_step/window_200",
        metric: "max_scroll_y",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 100_000.0,
    },
    // --- search structural budgets ---
    StructuralBudgetSpec {
        bench: "search/commit_filter_by_author_50k_commits",
        metric: "total_commits",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 50_000.0,
    },
    // "Alice" matches 1 of 10 first names → ~10% of 50k = ~5000.
    StructuralBudgetSpec {
        bench: "search/commit_filter_by_author_50k_commits",
        metric: "matches_found",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 4_000.0,
    },
    // Incremental refinement (appending 'x') should find fewer matches.
    StructuralBudgetSpec {
        bench: "search/commit_filter_by_author_50k_commits",
        metric: "incremental_matches",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 5_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/commit_filter_by_message_50k_commits",
        metric: "total_commits",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 50_000.0,
    },
    // "fix" matches 1 of 10 prefixes → ~10% of 50k = ~5000.
    StructuralBudgetSpec {
        bench: "search/commit_filter_by_message_50k_commits",
        metric: "matches_found",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 4_000.0,
    },
    // Incremental refinement should find fewer matches.
    StructuralBudgetSpec {
        bench: "search/commit_filter_by_message_50k_commits",
        metric: "incremental_matches",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 5_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/in_diff_text_search_100k_lines",
        metric: "total_lines",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 100_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/in_diff_text_search_100k_lines",
        metric: "visible_rows_scanned",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 110_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/in_diff_text_search_100k_lines",
        metric: "matches_found",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 7_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/in_diff_text_search_incremental_refinement",
        metric: "total_lines",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 100_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/in_diff_text_search_incremental_refinement",
        metric: "visible_rows_scanned",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 110_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/in_diff_text_search_incremental_refinement",
        metric: "prior_matches",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 7_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/in_diff_text_search_incremental_refinement",
        metric: "matches_found",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1_400.0,
    },
    StructuralBudgetSpec {
        bench: "search/in_diff_text_search_incremental_refinement",
        metric: "matches_found",
        comparator: StructuralBudgetComparator::AtMost,
        threshold: 1_700.0,
    },
    StructuralBudgetSpec {
        bench: "search/file_preview_text_search_100k_lines",
        metric: "total_lines",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 100_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/file_preview_text_search_100k_lines",
        metric: "source_bytes",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 3_000_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/file_preview_text_search_100k_lines",
        metric: "matches_found",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 6_250.0,
    },
    // --- file_fuzzy_find structural budgets ---
    StructuralBudgetSpec {
        bench: "search/file_fuzzy_find_100k_files",
        metric: "total_files",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 100_000.0,
    },
    StructuralBudgetSpec {
        bench: "search/file_fuzzy_find_100k_files",
        metric: "matches_found",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "search/file_fuzzy_find_100k_files",
        metric: "query_len",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 2.0,
    },
    StructuralBudgetSpec {
        bench: "search/file_fuzzy_find_incremental_keystroke",
        metric: "total_files",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 100_000.0,
    },
    // Incremental: the extended query should find fewer matches than the short one.
    StructuralBudgetSpec {
        bench: "search/file_fuzzy_find_incremental_keystroke",
        metric: "prior_matches",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "search/file_fuzzy_find_incremental_keystroke",
        metric: "matches_found",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    // --- fs_event --- filesystem event harness structural budgets
    StructuralBudgetSpec {
        bench: "fs_event/single_file_save_to_status_update",
        metric: "tracked_files",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1_000.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/single_file_save_to_status_update",
        metric: "mutation_files",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/single_file_save_to_status_update",
        metric: "dirty_files_detected",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/single_file_save_to_status_update",
        metric: "status_calls",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/git_checkout_200_files_to_status_update",
        metric: "tracked_files",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1_000.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/git_checkout_200_files_to_status_update",
        metric: "mutation_files",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/git_checkout_200_files_to_status_update",
        metric: "dirty_files_detected",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/git_checkout_200_files_to_status_update",
        metric: "status_calls",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/rapid_saves_debounce_coalesce",
        metric: "coalesced_saves",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 50.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/rapid_saves_debounce_coalesce",
        metric: "dirty_files_detected",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 50.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/rapid_saves_debounce_coalesce",
        metric: "status_calls",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/false_positive_rate_under_churn",
        metric: "mutation_files",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 100.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/false_positive_rate_under_churn",
        metric: "dirty_files_detected",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 0.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/false_positive_rate_under_churn",
        metric: "false_positives",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 100.0,
    },
    StructuralBudgetSpec {
        bench: "fs_event/false_positive_rate_under_churn",
        metric: "status_calls",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    // --- network --- mocked transport progress/cancel structural budgets
    StructuralBudgetSpec {
        bench: "network/ui_responsiveness_during_fetch",
        metric: "frame_count",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 240.0,
    },
    StructuralBudgetSpec {
        bench: "network/ui_responsiveness_during_fetch",
        metric: "total_frames",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 240.0,
    },
    StructuralBudgetSpec {
        bench: "network/ui_responsiveness_during_fetch",
        metric: "scroll_frames",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 240.0,
    },
    StructuralBudgetSpec {
        bench: "network/ui_responsiveness_during_fetch",
        metric: "progress_updates",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 240.0,
    },
    StructuralBudgetSpec {
        bench: "network/ui_responsiveness_during_fetch",
        metric: "window_rows",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 120.0,
    },
    StructuralBudgetSpec {
        bench: "network/ui_responsiveness_during_fetch",
        metric: "output_tail_lines",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 80.0,
    },
    StructuralBudgetSpec {
        bench: "network/ui_responsiveness_during_fetch",
        metric: "tail_trim_events",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 160.0,
    },
    StructuralBudgetSpec {
        bench: "network/progress_bar_update_render_cost",
        metric: "frame_count",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 360.0,
    },
    StructuralBudgetSpec {
        bench: "network/progress_bar_update_render_cost",
        metric: "progress_updates",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 360.0,
    },
    StructuralBudgetSpec {
        bench: "network/progress_bar_update_render_cost",
        metric: "render_passes",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 360.0,
    },
    StructuralBudgetSpec {
        bench: "network/progress_bar_update_render_cost",
        metric: "bar_width",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 32.0,
    },
    StructuralBudgetSpec {
        bench: "network/progress_bar_update_render_cost",
        metric: "output_tail_lines",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 80.0,
    },
    StructuralBudgetSpec {
        bench: "network/progress_bar_update_render_cost",
        metric: "tail_trim_events",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 280.0,
    },
    StructuralBudgetSpec {
        bench: "network/cancel_operation_latency",
        metric: "frame_count",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 69.0,
    },
    StructuralBudgetSpec {
        bench: "network/cancel_operation_latency",
        metric: "progress_updates",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 68.0,
    },
    StructuralBudgetSpec {
        bench: "network/cancel_operation_latency",
        metric: "render_passes",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 69.0,
    },
    StructuralBudgetSpec {
        bench: "network/cancel_operation_latency",
        metric: "cancel_frames_until_stopped",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 5.0,
    },
    StructuralBudgetSpec {
        bench: "network/cancel_operation_latency",
        metric: "drained_updates_after_cancel",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 4.0,
    },
    StructuralBudgetSpec {
        bench: "network/cancel_operation_latency",
        metric: "output_tail_lines",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 68.0,
    },
    // --- display --- render cost at different scales, multi-window, DPI switch
    StructuralBudgetSpec {
        bench: "display/render_cost_1x_vs_2x_vs_3x_scale",
        metric: "scale_factors_tested",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 3.0,
    },
    StructuralBudgetSpec {
        bench: "display/render_cost_1x_vs_2x_vs_3x_scale",
        metric: "total_layout_passes",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 3.0,
    },
    StructuralBudgetSpec {
        bench: "display/render_cost_1x_vs_2x_vs_3x_scale",
        metric: "windows_rendered",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 3.0,
    },
    StructuralBudgetSpec {
        bench: "display/render_cost_1x_vs_2x_vs_3x_scale",
        metric: "history_rows_per_pass",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 120.0,
    },
    StructuralBudgetSpec {
        bench: "display/render_cost_1x_vs_2x_vs_3x_scale",
        metric: "diff_rows_per_pass",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "display/two_windows_same_repo",
        metric: "windows_rendered",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 2.0,
    },
    StructuralBudgetSpec {
        bench: "display/two_windows_same_repo",
        metric: "total_layout_passes",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "display/two_windows_same_repo",
        metric: "total_rows_rendered",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 640.0,
    },
    StructuralBudgetSpec {
        bench: "display/two_windows_same_repo",
        metric: "history_rows_per_pass",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 120.0,
    },
    StructuralBudgetSpec {
        bench: "display/two_windows_same_repo",
        metric: "diff_rows_per_pass",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "display/window_move_between_dpis",
        metric: "scale_factors_tested",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 2.0,
    },
    StructuralBudgetSpec {
        bench: "display/window_move_between_dpis",
        metric: "re_layout_passes",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "display/window_move_between_dpis",
        metric: "total_layout_passes",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 2.0,
    },
    StructuralBudgetSpec {
        bench: "display/window_move_between_dpis",
        metric: "windows_rendered",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 2.0,
    },
    // --- real_repo --- external snapshot-backed nightly-only structural budgets
    StructuralBudgetSpec {
        bench: "real_repo/monorepo_open_and_history_load",
        metric: "worktree_file_count",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 100_000.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/monorepo_open_and_history_load",
        metric: "commits_loaded",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 5_000.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/monorepo_open_and_history_load",
        metric: "graph_rows",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 5_000.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/monorepo_open_and_history_load",
        metric: "status_calls",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/monorepo_open_and_history_load",
        metric: "log_walk_calls",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/monorepo_open_and_history_load",
        metric: "ref_enumerate_calls",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/deep_history_open_and_scroll",
        metric: "commits_loaded",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 50_000.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/deep_history_open_and_scroll",
        metric: "graph_rows",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 50_000.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/deep_history_open_and_scroll",
        metric: "log_pages_loaded",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 50.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/deep_history_open_and_scroll",
        metric: "history_windows_scanned",
        comparator: StructuralBudgetComparator::Exactly,
        threshold: 3.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/deep_history_open_and_scroll",
        metric: "max_graph_lanes",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/mid_merge_conflict_list_and_open",
        metric: "conflict_files",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 50.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/mid_merge_conflict_list_and_open",
        metric: "status_entries",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 50.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/mid_merge_conflict_list_and_open",
        metric: "conflict_regions",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/mid_merge_conflict_list_and_open",
        metric: "selected_conflict_bytes",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/large_file_diff_open",
        metric: "diff_lines",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 50_000.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/large_file_diff_open",
        metric: "file_new_bytes",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1_000_000.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/large_file_diff_open",
        metric: "split_rows_painted",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/large_file_diff_open",
        metric: "inline_rows_painted",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 200.0,
    },
    StructuralBudgetSpec {
        bench: "real_repo/large_file_diff_open",
        metric: "diff_calls",
        comparator: StructuralBudgetComparator::AtLeast,
        threshold: 1.0,
    },
];
