Closed tdhock closed 9 years ago
@da-ta-vinci21 after you get this working then you can try to push the web page and plots from travis to github as described in https://github.com/rstats-gsoc/gsoc2015/wiki/Test-timings-on-Travis#project-ideas
@tdhock I was able to plot the data using the above command. However, do I need to generate a webpage containing the plots, store that webpage in the directory and then push it from local machine/travis to github? If yes, I am a bit confused about how to generate the webpage. Can you suggest me a method to look into?
why can't you plot the data with facet_grid? You should be able to. What was the error message you saw?
to generate a web page with the resulting plot, try writing a Rmd file and using library(knitr)
On Fri, Jul 17, 2015 at 9:30 PM, Akash Tandon notifications@github.com wrote:
@tdhock https://github.com/tdhock I was able to plot the data using the above command. However, do I need to generate a webpage containing the plots, store that webpage in the directory and then push it from local machine/travis to github? If yes, I am a bit confused about how to generate the webpage. Can you suggest me a method to look into?
— Reply to this email directly or view it on GitHub https://github.com/da-ta-vinci21/Rperform/issues/8#issuecomment-122465744 .
Oh, I think you misread my post. I was able to plot the data.
great, can you post one of the facet_grid plots so we can discuss tomorrow?
On Sat, Jul 18, 2015 at 6:41 PM, Akash Tandon notifications@github.com wrote:
Oh, I think you misread my post. I was able to plot the data.
— Reply to this email directly or view it on GitHub https://github.com/da-ta-vinci21/Rperform/issues/8#issuecomment-122602588 .
> t_data <- Rperform::time_compare(test_path = "./tests/testthat/test-dup.r", num_commits = 5)
> m_data <- Rperform::mem_compare(test_path = "./tests/testthat/test-dup.r", num_commits = 5)
> data <- rbind(m_data, t_data)
> ggplot2::qplot(data = data, x = msg_val, y = metric_val, color = test_name) + ggplot2::facet_grid(metric_name ~ test_name) + ggplot2::theme(axis.text.x = ggplot2::element_text(angle = -90)) + ggplot2::scale_x_discrete(limits = rev(levels(data$msg))) + ggplot2::xlab(label = "Commit messages") + ggplot2::ggtitle("Variation in metrics across Git versions")
Thanks for making that plot.
A couple of suggestions:
No need to put test_name as both color and a facet variable (one or the other is sufficient, and both is potentially confusing).
It would be better to change metric_name="time" to metric_name="seconds" so the reader is able to see the units of time.
It would be better to make a facet_grid(metric_name ~ ., units="free") plot for each value of test_name. There are two reasons: (1) it is not interesting to compare metric_val numbers between different tests. (2) metric_val numbers are on very different scales so when you force them to be on the same scale it is impossible to see differences and variation.
On Tue, Jul 21, 2015 at 9:16 AM, Akash Tandon notifications@github.com wrote:
t_data <- Rperform::time_compare(test_path = "./tests/testthat/test-dup.r", num_commits = 5) m_data <- Rperform::mem_compare(test_path = "./tests/testthat/test-dup.r", num_commits = 5) data <- rbind(m_data, t_data) ggplot2::qplot(data = data, x = msg_val, y = metric_val, color = test_name) + ggplot2::facet_grid(metric_name ~ test_name) + ggplot2::theme(axis.text.x = ggplot2::element_text(angle = -90)) + ggplot2::scale_x_discrete(limits = rev(levels(data$msg))) + ggplot2::xlab(label = "Commit messages") + ggplot2::ggtitle("Variation in metrics across Git versions")
[image: rperform_grid] https://cloud.githubusercontent.com/assets/4419448/8801476/953c0e86-2fd8-11e5-9dfb-7a734c7553d2.jpeg
— Reply to this email directly or view it on GitHub https://github.com/da-ta-vinci21/Rperform/issues/8#issuecomment-123301156 .
maybe use library(xtable)
or library(knitr)
maybe include a link to RData files on the web page.
check this related work into generating a web page for plotly https://github.com/ropensci/plotly-test-table/tree/gh-pages
this is the script that Carson used to automatically push a web page and a comment from Travis to Github https://github.com/ropensci/plotly/blob/master/inst/testscripts/.push_test_table.sh
Update from Akash:
I was able to successfully run Rperform on the Travis machine and then push the results to a gh-pages branch. I did it for a clone of ggplotly which also happens to not use the testthat package for testing.
You can find more relevant information at the links below:
Travis Build: https://travis-ci.org/da-ta-vinci21/Rperform_ggplotly/builds/73873163
ggplotly gh-pages branch: https://github.com/da-ta-vinci21/Rperform_ggplotly/tree/gh-pages
Commit featuring the sample travis.yml file and push_gh_pages script: https://github.com/da-ta-vinci21/Rperform/commit/949315de477466f60a26ed47ba01d40503eab14b
.travis.yml for the ggplotly clone: https://github.com/da-ta-vinci21/Rperform_ggplotly/blob/master/.travis.yml
.push_gh_pages.sh for the ggplotly clone: https://github.com/da-ta-vinci21/Rperform_ggplotly/blob/master/.push_gh_pages.sh
TODO ggtitle(test_name) instead of aes(color=test_name)
Link to the wiki for integrating Rperform with Travis-CI: Rperform Wiki
I will make changes as we had discussed today (such as inclusion of a custom Rperform script instead of using echo). Still, here is the initial wiki about the work done till now.
Hey Akash thanks for writing that wiki page. It is very informative and I just tried it on https://travis-ci.org/tdhock/PeakError/builds/73955726
On Mon, Aug 3, 2015 at 2:19 PM, Akash Tandon notifications@github.com wrote:
Link to the wiki for integrating Rperform with Travis-CI: Rperform Wiki https://github.com/da-ta-vinci21/Rperform/wiki#integrating-rperform-with-travis-ci
I will make changes as we had discussed today (such as inclusion of a custom Rperform script instead of using echo). Still, here is the initial wiki about the work done till now.
— Reply to this email directly or view it on GitHub https://github.com/da-ta-vinci21/Rperform/issues/8#issuecomment-127360212 .
Actually I got an error, https://travis-ci.org/tdhock/PeakError/builds/73955726#L1266
Are you sure it shouldn't be https://tdhock@github.com/PeakError instead of https://${GH_TOKEN}@github.com/PeakError? This error message compromised the security of my token, so I deleted it.
On Mon, Aug 3, 2015 at 4:38 PM, Toby Hocking tdhock5@gmail.com wrote:
Hey Akash thanks for writing that wiki page. It is very informative and I just tried it on https://travis-ci.org/tdhock/PeakError/builds/73955726
On Mon, Aug 3, 2015 at 2:19 PM, Akash Tandon notifications@github.com wrote:
Link to the wiki for integrating Rperform with Travis-CI: Rperform Wiki https://github.com/da-ta-vinci21/Rperform/wiki#integrating-rperform-with-travis-ci
I will make changes as we had discussed today (such as inclusion of a custom Rperform script instead of using echo). Still, here is the initial wiki about the work done till now.
— Reply to this email directly or view it on GitHub https://github.com/da-ta-vinci21/Rperform/issues/8#issuecomment-127360212 .
Oh, I think it wasn't clear enough from the wiki. For the repo PeakError, it should be https://${GH_TOKEN}@github.com/tdhock/PeakError.
thanks for the info. I will try that.
However you don't think there is any security problem?
On Mon, Aug 3, 2015 at 10:53 PM, Akash Tandon notifications@github.com wrote:
Oh, I think it wasn't clear enough from the wiki. For the repo PeakError, it should be https://${GH_TOKEN}@github.com/tdhock/PeakError.
— Reply to this email directly or view it on GitHub https://github.com/da-ta-vinci21/Rperform/issues/8#issuecomment-127461148 .
great job with the coding and documentation.
After rbinding together all the memory+time profiles for all the test files of a package, it would be nice to see a plot on a web page that summarizes that info.
Can you try to do a plot of all the data with
facet_grid(metric_name ~ test.name, scales="free")
?