Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
- Included an example of plot_branchmetrics()
- Updated previous examples.
  • Loading branch information
analyticalmonk committed Jun 20, 2016
1 parent d61926d commit 64ee740
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Also, you can use Rperform with travis-ci to do performance testing during your
Installation
------------

To get started, you can install the package from github using `devtools`*.
- You can install the package from github using `devtools`*.

``` r
library(devtools)
Expand All @@ -29,6 +29,15 @@ devtools::install_github("analyticalmonk/Rperform")

*Follow the instructions on the [devtools README](https://github.com/hadley/devtools#updating-to-the-latest-version-of-devtools) to install the latest version.


- Build and install it using the command line.

```
git clone https://github.com/analyticalmonk/rperform/ Rperform
R CMD build Rperform
R CMD INSTALL <insert name of the built tar file>
```

Examples
--------

Expand All @@ -41,23 +50,26 @@ git repository before using the functions.
> setwd(dir = "Path/to/repo")
```

The following examples illustrates the use of the `Rperform::plot_metrics()` function on the git repository of the package [stringr](https://github.com/tdhock/stringr).
- The following example illustrates the use of the `Rperform::plot_metrics()` function on the git repository of the package [stringr](https://github.com/tdhock/stringr).

```r
> setwd("./stringr")
> library(Rperform)
> plot_metrics(test_path = "./tests/testthat/test-extract.r", num_commits = 10, save_data = FALSE, save_plots = FALSE)
> plot_metrics(test_path = "tests/testthat/test-join.r", metric = "time", num_commits = 10, save_data = FALSE, save_plots = FALSE)
```
![time plot](images/Rplot_time.jpeg)

- The following example illustrates the use of the `Rperform::plot_branchmetrics()` function on the git repository of the package [stringr](https://github.com/tdhock/stringr).

```r
> Rperform::plot_metrics(test_path = "./tests/testthat/test-dup.r", metric = "memory", num_commits = 5, save_data = F, save_plots = F)
> setwd("./stringr")
> library(Rperform)
> plot_branchmetrics(test_path = "tests/testthat/test-interp.r", metric = "memory", branch1 = "rperform_test", branch2 = "master", save_data = F, save_plots = F)
```
![memory plot](images/Rplot_mem.jpeg)
![memory plot](images/Rplot_branchmem.jpeg)


The following example illustrates the use of the `Rperform::time_compare()` and `Rperform::mem_compare()` functions on the git repository
of the package [stringr](https://github.com/tdhock/stringr).
- The following example illustrates the use of the `Rperform::time_compare()` and `Rperform::mem_compare()` functions on the git repository of the package [stringr](https://github.com/tdhock/stringr).

```r
> setwd("./stringr")
Expand Down
Binary file added images/Rplot_branchmem.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/Rplot_time.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 64ee740

Please sign in to comment.