pub struct ExportStats {
pub states_exported: usize,
pub commits_total: usize,
pub threads_synced: usize,
pub markers_synced: usize,
pub branches: Vec<ExportedRef>,
pub tags: Vec<ExportedRef>,
}Expand description
Statistics for export operation.
commits_total counts the commits that actually land in the
destination: it is derived from the same branch/tag ref set
(collect_ref_updates) that copy_mirror_to_path copies, by walking
the commit ancestry of those tips. Counting from the copy path — rather
than a parallel walk over current Heddle refs — guarantees the reported
total equals what’s copied, including a stale mirror ref left behind by
a dropped thread (export does not prune mirror refs, so that commit
still travels and is still counted). states_exported is the
freshly-minted subset of that same copied ref set — both counts are
partitions of one walk, so states_exported + already == commits_total
holds by construction and a state minted into the mirror but reachable
from no copied ref (an orphan dropped-thread history) inflates neither.
They diverge whenever the destination is already populated: an overlay
re-export reports commits_total = N and states_exported = 0 — the
signal that surfaces “already in sync” instead of a misleading bare
“exported 0 states” (heddle#289, mirroring the import-side
commits_imported/states_created split from heddle#147).
Fields§
§states_exported: usizeFreshly-minted git commits that land in the destination — the subset of the copied ref set’s commits minted during this export (no preserved git_oid). Stays at 0 when every copied commit was already mapped to an existing commit. A minted commit reachable from no copied ref is excluded (it never reaches the destination).
commits_total: usizeUnique commits reachable from the branch/tag tips copied to the
destination, including ones whose commit already existed and any
carried by a stale mirror ref. Mirrors
ImportStats::commits_imported.
threads_synced: usize§markers_synced: usize§branches: Vec<ExportedRef>Branches written to the destination, paired with their tip commit so the summary can show tip short-SHAs.
Tags written to the destination, paired with their tip commit.
Trait Implementations§
Source§impl Debug for ExportStats
impl Debug for ExportStats
Source§impl Default for ExportStats
impl Default for ExportStats
Source§fn default() -> ExportStats
fn default() -> ExportStats
Auto Trait Implementations§
impl Freeze for ExportStats
impl RefUnwindSafe for ExportStats
impl Send for ExportStats
impl Sync for ExportStats
impl Unpin for ExportStats
impl UnsafeUnpin for ExportStats
impl UnwindSafe for ExportStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request