MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / merge

Method merge

atomic-core/src/crdt/apply/context.rs:342–357  ·  view source on GitHub ↗

Merges another stats instance into this one. This is useful when combining stats from parallel operations.

(&mut self, other: &ApplyStats)

Source from the content-addressed store, hash-verified

340 ///
341 /// This is useful when combining stats from parallel operations.
342 pub fn merge(&mut self, other: &ApplyStats) {
343 self.trunks_created += other.trunks_created;
344 self.trunks_deleted += other.trunks_deleted;
345 self.trunks_moved += other.trunks_moved;
346 self.trunks_undeleted += other.trunks_undeleted;
347 self.branches_inserted += other.branches_inserted;
348 self.branches_deleted += other.branches_deleted;
349 self.branches_restored += other.branches_restored;
350 self.leaves_inserted += other.leaves_inserted;
351 self.leaves_deleted += other.leaves_deleted;
352 self.leaves_replaced += other.leaves_replaced;
353 self.leaves_restored += other.leaves_restored;
354 self.content_bytes_processed += other.content_bytes_processed;
355 self.conflicts_detected += other.conflicts_detected;
356 self.operations_skipped += other.operations_skipped;
357 }
358}
359
360impl fmt::Display for ApplyStats {

Callers 1

test_stats_mergeFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_stats_mergeFunction · 0.36