% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/repo_metrics.R
\name{time_compare}
\alias{time_compare}
\title{Run-time across versions.}
\usage{
time_compare(test_path, num_commits = 10)
}
\arguments{
\item{test_path}{File-path of the test-file which is to be used for run-time
comparisons.}

\item{num_commits}{Number of commits (versions) against which the file is to
be tested, with default being 10.}
}
\description{
Given a test-file path, checks its run-time against the specified number of commits 
in the current git repository and returns a data-frame comprised of the test name, 
status of test run, time (if successful) and SHA1 value corresponding to the commit
the value is for.
}
\section{Value}{

time_compare returns an object of class "data.frame".
The data-frame consists of the following columns:
\code{test_name}
\code{metric_name}
\code{status}
\code{metric_val}
\code{message}
\code{sha}
\code{date_time}
}

\section{Warning}{

  Function assumes the current directory to be the root directory of the
  package being tested.
}
\examples{

\dontrun{
## Example-1

# Set the current directory to the git repository concerned.
setwd("./Path/to/repository")

# Specify the test-file path
t_path <- "Path/to/file"

# Pass the parameters and obtain the run-time details against 10 commits
library(Rperform)
time_compare(test_path = t_path, num_commits = 10)
}

}

