cow_report: Copy-on-Write Policy Report

View source: R/diagnostics.R

cow_reportR Documentation

Copy-on-Write Policy Report

Description

Generates a report of copy-on-write behavior for borrowed inputs.

Usage

cow_report(result = NULL)

Arguments

result

Optional. A shard_result object to extract COW stats from.

Value

An S3 object of class shard_report with type "cow" containing:

  • type: "cow"

  • timestamp: When the report was generated

  • policy: The COW policy used ("deny", "audit", "allow")

  • violations: Count of COW violations detected (audit mode)

  • copies_triggered: Estimated copies triggered by mutations

Examples


res <- shard_map(shards(100, workers = 2), function(s) sum(s$idx), workers = 2)
pool_stop()
cow_report(res)


shard documentation built on April 3, 2026, 9:08 a.m.