Closed analyticalmonk closed 8 years ago
@tdhock Is the above an improvement over the previous method of plotting all tests on a single plot? I have refrained from putting each block and the file itself on different plots since that would make it hard to work with them interactively.
yes this is much better!
Some users will want to do facet_grid(test_name ~ .)
for one value of metric_name (for example seconds as you have here)
and others will want to do facet_grid(metric_name ~ .)
for one value of test_name (to see if both time and memory profiles have changed after a given commit)
it would be nice if you could give the user the choice of what to plot (with some reasonable defaults of course). maybe move the ggplot code from inside of the plot_* functions to inside the temp_Rperform.R script that is run from .push_gh_pages?
I am modifying the existing plot functions to let user choose the type of plot he desires among the above two. I have integrated all the plot functions into a single one with one parameter being needed to choose the type of plots desired. I haven't committed the changes yet but below are some examples.
Command:
Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "testMetrics", num_commits = 4)
Output plots:
Command:
Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "time", num_commits = 4)
Output plot:
Command:
Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "mem", num_commits = 4)
Output plot:
looks good Akash.
however for the last plot there is no need for both aes(color=metric_name) and facet_grid( ~ metric_name) -- rendundantly using two visual properties to display the same data variable can be confusing. It would be better to just use one or the other, probably facet_grid( ~ metric_name) would be better.
On Thu, Aug 6, 2015 at 7:35 AM, Akash Tandon notifications@github.com wrote:
I am modifying the existing plot functions to let user choose the type of plot he desires among the above two. I have integrated all the plot functions into a single one with one parameter being needed to choose the type of plots desired. I haven't committed the changes yet but below are some examples.
Command: Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "testMetrics", num_commits = 4)
Output plots: [image: test1] https://cloud.githubusercontent.com/assets/4419448/9110564/575ee350-3c5c-11e5-8b63-4d1903adf382.png
[image: test2] https://cloud.githubusercontent.com/assets/4419448/9110569/5c7a3344-3c5c-11e5-8313-840dc095de68.png
[image: test3] https://cloud.githubusercontent.com/assets/4419448/9110571/5fded0c6-3c5c-11e5-8224-2daebe2df7e9.png
Command: Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "time", num_commits = 4)
Output plot: [image: rplot_time_test-join] https://cloud.githubusercontent.com/assets/4419448/9110589/8215a520-3c5c-11e5-9af5-22646d7ae435.jpeg
Command: Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "mem", num_commits = 4)
Output plot: [image: rplot_mem_testjoin] https://cloud.githubusercontent.com/assets/4419448/9110652/10441a8e-3c5d-11e5-997a-775b52a82be5.jpeg
— Reply to this email directly or view it on GitHub https://github.com/da-ta-vinci21/Rperform/issues/11#issuecomment-128335381 .
Oh yeah, I was playing around with it during testing the code interactively. I forgot to remove the aes part. Will do it.
Regards, Akash Tandon, Senior undergraduate (B.Tech-III), National Institute of Technology, Surat
On Thu, Aug 6, 2015 at 6:29 PM, Toby Dylan Hocking <notifications@github.com
wrote:
looks good Akash.
however for the last plot there is no need for both aes(color=metric_name) and facet_grid( ~ metric_name) -- rendundantly using two visual properties to display the same data variable can be confusing. It would be better to just use one or the other, probably facet_grid( ~ metric_name) would be better.
On Thu, Aug 6, 2015 at 7:35 AM, Akash Tandon notifications@github.com wrote:
I am modifying the existing plot functions to let user choose the type of plot he desires among the above two. I have integrated all the plot functions into a single one with one parameter being needed to choose the type of plots desired. I haven't committed the changes yet but below are some examples.
Command: Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "testMetrics", num_commits = 4)
Output plots: [image: test1] < https://cloud.githubusercontent.com/assets/4419448/9110564/575ee350-3c5c-11e5-8b63-4d1903adf382.png
[image: test2] < https://cloud.githubusercontent.com/assets/4419448/9110569/5c7a3344-3c5c-11e5-8313-840dc095de68.png
[image: test3] < https://cloud.githubusercontent.com/assets/4419448/9110571/5fded0c6-3c5c-11e5-8224-2daebe2df7e9.png
Command: Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "time", num_commits = 4)
Output plot: [image: rplot_time_test-join] < https://cloud.githubusercontent.com/assets/4419448/9110589/8215a520-3c5c-11e5-9af5-22646d7ae435.jpeg
Command: Rperform::plot_metrics(test_path = "./tests/testthat/test-join.r", metric = "mem", num_commits = 4)
Output plot: [image: rplot_mem_testjoin] < https://cloud.githubusercontent.com/assets/4419448/9110652/10441a8e-3c5d-11e5-997a-775b52a82be5.jpeg
— Reply to this email directly or view it on GitHub < https://github.com/da-ta-vinci21/Rperform/issues/11#issuecomment-128335381
.
— Reply to this email directly or view it on GitHub https://github.com/da-ta-vinci21/Rperform/issues/11#issuecomment-128354421 .
I got this error
## Error in .Call("loop_apply", as.integer(n), f, env): "loop_apply" not resolved from current namespace (plyr)
when running Rperform using this script https://github.com/tdhock/PeakError/blob/master/.push_gh_pages.sh
It probably will be fixed when you use the new master branch of plyr, which merged this change today:
The above fix did the trick!
Currently, the metrics for each individual test files and all the testthat blocks it contains are plotted on a single graph by the Rperform plotting functions.
Since comparing different testthat blocks and the file against each other isn't of much use, it would be better to plot metrics for a test-file and each individual testthat block on separate plots.