% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hot-lines.R
\name{pv_hot_lines}
\alias{pv_hot_lines}
\title{Hot source lines by self-time}
\usage{
pv_hot_lines(x, n = NULL, min_pct = 0, min_time_ms = 0)
}
\arguments{
\item{x}{A profvis object.}

\item{n}{Maximum number of lines to return. If \code{NULL}, returns all that pass
the filters.}

\item{min_pct}{Minimum percentage of total time to include (default 0).}

\item{min_time_ms}{Minimum time in milliseconds to include (default 0).}
}
\value{
A data frame with columns:
\itemize{
\item \code{location}: File path and line number (e.g., "R/foo.R:42")
\item \code{label}: Function name at this location
\item \code{filename}: Source file path
\item \code{linenum}: Line number
\item \code{samples}: Number of profiling samples
\item \code{time_ms}: Time in milliseconds
\item \code{pct}: Percentage of total time
}
}
\description{
Returns the source lines where the most CPU time is spent. Requires source
references (use \code{devtools::load_all()} for best results).
}
\examples{
p <- pv_example()
pv_hot_lines(p)

# Only lines with >= 10\% of time
pv_hot_lines(p, min_pct = 10)
}
