pub struct FetchReport {
pub hash_kind: Kind,
pub advertised: Vec<AdvertisedRef>,
pub updates: Vec<RefUpdatePlan>,
pub receipt: Option<PackReceipt>,
pub objects_total: u32,
pub objects_done: u32,
pub pack_bytes: u64,
pub haves_sent: usize,
pub acked: Vec<ObjectId>,
pub rounds: usize,
}Expand description
What one fetch did.
Fields§
§hash_kind: KindThe hash kind the exchange ran at.
advertised: Vec<AdvertisedRef>Every reference the remote advertised, whether or not it was wanted.
updates: Vec<RefUpdatePlan>The references the caller’s plan chose, and where they would move.
receipt: Option<PackReceipt>What the PackIngest said, or None when there was nothing to fetch.
None is the ordinary answer for a mirror polling a remote that has not
moved: no want, no command=fetch, no pack, and no walk charged to
the server.
objects_total: u32The object count the packfile declared, read from bytes 8..12 of its header before a single object was stored.
This is the denominator a progress bar needs, and it is available at the start of the transfer rather than the end. Zero when no pack was fetched.
objects_done: u32The object count the ingest actually indexed, from the receipt.
Equal to Self::objects_total or the fetch fails; see
FetchPack::fetch. The numerator’s live progress belongs to the
ingest and not to this module: counting objects as they pass means
inflating every one of them, which is a whole second pack decoder, and
gunnar already has exactly one (one implementation). What this module can report
live — and does, through FetchProgress — is the declared total the
moment the header arrives, and the byte count as it streams.
pack_bytes: u64Packfile bytes handed to the ingest, header and trailer included.
haves_sent: usizeHow many have lines were offered.
acked: Vec<ObjectId>Every ACK <oid> the remote sent, in order.
rounds: usizeHow many command=fetch rounds were spent. Zero when nothing was
wanted, one when the remote was ready immediately, otherwise two.