% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnostics.R
\name{cow_report}
\alias{cow_report}
\title{Copy-on-Write Policy Report}
\usage{
cow_report(result = NULL)
}
\arguments{
\item{result}{Optional. A \code{shard_result} object to extract COW stats from.}
}
\value{
An S3 object of class \code{shard_report} with type \code{"cow"}
containing:
\itemize{
\item \code{type}: "cow"
\item \code{timestamp}: When the report was generated
\item \code{policy}: The COW policy used ("deny", "audit", "allow")
\item \code{violations}: Count of COW violations detected (audit mode)
\item \code{copies_triggered}: Estimated copies triggered by mutations
}
}
\description{
Generates a report of copy-on-write behavior for borrowed inputs.
}
\examples{
\donttest{
res <- shard_map(shards(100, workers = 2), function(s) sum(s$idx), workers = 2)
pool_stop()
cow_report(res)
}
}
