1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
//! Centralized default values for git-perf configuration.
//!
//! This module defines all default values used throughout the application
//! to avoid magic numbers scattered in the codebase. These defaults are used
//! as fallback values when configuration is not explicitly provided.
// ============================================================================
// Audit Configuration Defaults
// ============================================================================
/// Default minimum number of historical measurements required for audit.
///
/// When auditing a measurement, at least this many historical data points
/// are required to establish a statistical baseline. If fewer measurements
/// are available, the audit will be skipped with a warning.
///
/// This value is used when neither CLI options nor configuration file
/// specify `min_measurements`.
pub const DEFAULT_MIN_MEASUREMENTS: u16 = 2;
/// Default sigma (standard deviation threshold) for statistical significance.
///
/// Measurements are considered significantly different if their z-score
/// exceeds this threshold. A value of 4.0 means that the measurement must
/// be more than 4 standard deviations (or MAD units) away from the mean
/// to be flagged as a regression.
///
/// This value is used when neither CLI options nor configuration file
/// specify `sigma`.
pub const DEFAULT_SIGMA: f64 = 4.0;
// ============================================================================
// Backoff Configuration Defaults
// ============================================================================
/// Default maximum elapsed time (in seconds) for exponential backoff retries.
///
/// When operations fail (e.g., network requests for git operations), the system
/// will retry with exponential backoff up to this maximum duration before
/// giving up.
///
/// This value is used when configuration file does not specify
/// `backoff.max_elapsed_seconds`.
pub const DEFAULT_BACKOFF_MAX_ELAPSED_SECONDS: u64 = 60;
// ============================================================================
// Epoch Configuration Defaults
// ============================================================================
/// Default epoch value when no epoch is configured.
///
/// An epoch is a commit hash that marks the start of a new measurement series.
/// When measurements are incompatible between different periods (e.g., after
/// a significant change to the benchmark), a new epoch can be set to separate
/// the data.
///
/// A value of 0 indicates no epoch boundary, meaning all measurements are
/// considered part of the same series.
pub const DEFAULT_EPOCH: u32 = 0;
// ============================================================================
// Git Configuration Defaults
// ============================================================================
// Default remote name for git-perf notes:
// This is already defined as GIT_PERF_REMOTE in git/git_definitions.rs
// and should not be duplicated. The actual value is "git-perf-origin".
// See git/git_definitions.rs:28 for the implementation.
// ============================================================================
// Helper Functions
// ============================================================================
/// Returns the default minimum number of measurements for audit.
pub const
/// Returns the default sigma threshold for statistical significance.
pub const
/// Returns the default backoff max elapsed seconds.
pub const
/// Returns the default epoch value.
pub const