% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/call-stats.R
\name{pv_call_stats}
\alias{pv_call_stats}
\title{Call statistics summary}
\usage{
pv_call_stats(x, n = NULL)
}
\arguments{
\item{x}{A profvis object.}

\item{n}{Maximum number of functions to return. If \code{NULL}, returns all.}
}
\value{
A data frame with columns:
\itemize{
\item \code{label}: Function name
\item \code{calls}: Estimated number of calls (based on stack appearances)
\item \code{total_ms}: Total time on call stack
\item \code{self_ms}: Time at top of stack (self time)
\item \code{child_ms}: Time in callees
\item \code{ms_per_call}: Average milliseconds per call
\item \code{pct}: Percentage of total profile time
}
}
\description{
Shows call count, total time, self time, and time per call for each
function. This is especially useful for identifying functions that are
called many times (where per-call optimization or reducing call count
would help).
}
\examples{
p <- pv_example()
pv_call_stats(p)
}
