()
| 160 | |
| 161 | impl Default for ImportStats { |
| 162 | fn default() -> Self { |
| 163 | // CB-13C F4: every import run carries a fresh correlation ID so |
| 164 | // its events (including partial-failure aggregates) correlate. |
| 165 | static COUNTER: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0); |
| 166 | let sequence = COUNTER.fetch_add(1, std::sync::atomic::Ordering::Relaxed); |
| 167 | let millis = std::time::SystemTime::now() |
| 168 | .duration_since(std::time::UNIX_EPOCH) |
| 169 | .map(|d| d.as_millis()) |
| 170 | .unwrap_or(0); |
| 171 | Self { |
| 172 | commits_found: 0, |
| 173 | commits_parsed: 0, |
| 174 | changes_written: 0, |
| 175 | resurrected_exact: 0, |
| 176 | correlation_id: format!("import-{millis}-{}-{sequence}", std::process::id()), |
| 177 | empty_commits: 0, |
| 178 | merge_commits: 0, |
| 179 | self_push_skipped: 0, |
| 180 | squash_inserted: 0, |
| 181 | squash_skipped: 0, |
| 182 | phase1_duration: std::time::Duration::ZERO, |
| 183 | phase2_duration: std::time::Duration::ZERO, |
| 184 | files_processed: 0, |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | /// `atomic git push` trailers parsed from a commit message. |
nothing calls this directly
no outgoing calls
no test coverage detected