% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnostics.R
\name{mem_report}
\alias{mem_report}
\title{Memory Usage Report}
\usage{
mem_report(pool = NULL)
}
\arguments{
\item{pool}{Optional. A \code{shard_pool} object. If NULL, uses the current pool.}
}
\value{
An S3 object of class \code{shard_report} with type \code{"memory"}
containing:
\itemize{
\item \code{type}: "memory"
\item \code{timestamp}: When the report was generated
\item \code{pool_active}: Whether a pool exists
\item \code{n_workers}: Number of workers
\item \code{rss_limit}: RSS limit per worker (bytes)
\item \code{total_rss}: Sum of RSS across all workers
\item \code{peak_rss}: Highest RSS among workers
\item \code{mean_rss}: Mean RSS across workers
\item \code{workers}: Per-worker RSS details
}
}
\description{
Generates a report of memory usage across all workers in the pool.
}
\examples{
\donttest{
p <- pool_create(2)
mem_report(p)
pool_stop(p)
}
}
