diff --git a/.Rbuildignore b/.Rbuildignore index 26df77a..7bcca4d 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -5,8 +5,14 @@ ^README\.*html$ ^NOTES\.*Rmd$ ^NOTES\.*html$ +^README\.gfm*$ +^README_cache$ ^\.codecov\.yml$ ^README_files$ ^doc$ ^CONDUCT\.md$ -^imgs$ \ No newline at end of file +^imgs$ +^LICENSE\.md$ +^Makefile$ +^appveyor\.yml$ + diff --git a/.travis.yml b/.travis.yml index 76d9586..2c5162c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,4 @@ -language: r - -warnings_are_errors: true - -sudo: required - +language: R cache: packages - -r: - - oldrel - - release - - devel - -apt_packages: - - libv8-dev - - xclip - -env: - global: - - CRAN: http://cran.rstudio.com - after_success: - - Rscript -e 'covr::codecov()' - -notifications: - email: - - bob@rud.is - irc: - channels: - - "104.236.112.222#builds" - nick: travisci + - Rscript -e 'covr::codecov()' \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index bcdbe6a..7b7b962 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,40 +1,31 @@ Package: speedtest Type: Package Title: Tools to Test and Compare Internet Bandwidth Speeds -Version: 0.1.0 -Date: 2017-11-09 -Authors@R: c( - person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), - comment = c(ORCID = "0000-0001-5670-2640")), - person("Bryce", "Mecum", email = "petridish@gmail.com", role = "ctb", - comment = c(ORCID = "0000-0002-0381-3766")), - person("Garrett", "Mooney", email = "gmooney@mail.bradley.edu", role = "ctb") - ) -Author: Bob Rudis (bob@rud.is) +Version: 0.2.0 +Date: 2019-07-24 +Authors@R: c( person("Bob", "Rudis", email = "bob@rud.is", + role = c("aut", "cre"), comment = c(ORCID = + "0000-0001-5670-2640")), person("Bryce", "Mecum", + email = "petridish@gmail.com", role = "ctb", comment + = c(ORCID = "0000-0002-0381-3766")), + person("Garrett", "Mooney", email = + "gmooney@mail.bradley.edu", role = "ctb") ) Maintainer: Bob Rudis -Description: The 'Ookla' 'Speedtest' site provides - interactive and programmatic services to test and compare bandwidth speeds from - a source node on the Internet to thousands of test servers. Tools are provided - to obtain test server lists, identify target servers for testing and performing - speed/bandwidth tests. -URL: https://github.com/hrbrmstr/speedtest -BugReports: https://github.com/hrbrmstr/speedtest/issues -License: AGPL -Suggests: - testthat, - covr -Depends: - R (>= 3.2.0) +Description: The 'Ookla' 'Speedtest' site + provides + interactive and programmatic services to test and + compare bandwidth speeds from a source node on the + Internet to thousands of test servers. Tools are + provided to obtain test server lists, identify target + servers for testing and performing speed/bandwidth + tests. +URL: https://gitlab.com/hrbrmstr/speedtest +BugReports: https://gitlab.com/hrbrmstr/speedtest/issues +License: MIT + file LICENSE +Suggests: covr, tinytest +Depends: R (>= 3.2.0) Encoding: UTF-8 -Imports: - curl, - purrr, - dplyr, - xml2, - utils, - pingr, - urltools, - jsonlite, - crayon, - cli -RoxygenNote: 6.0.1 +Imports: httr, stats, curl, purrr, dplyr, xml2, utils, + pingr, urltools, jsonlite, crayon, tibble, cli, + magrittr +RoxygenNote: 6.1.1 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b6a10f1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2019 +COPYRIGHT HOLDER: Bob Rudis diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..c36552c --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2019 Bob Rudis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/NAMESPACE b/NAMESPACE index 084c6ea..820473e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,7 @@ # Generated by roxygen2: do not edit by hand +export("%>%") +export(nice_speed) export(spd_best_servers) export(spd_closest_servers) export(spd_compute_bandwidth) @@ -16,13 +18,16 @@ import(xml2) importFrom(curl,curl_fetch_multi) importFrom(curl,multi_run) importFrom(dplyr,arrange) -importFrom(dplyr,data_frame) importFrom(dplyr,filter) importFrom(dplyr,left_join) importFrom(dplyr,mutate) importFrom(dplyr,select) importFrom(dplyr,summarise) importFrom(jsonlite,fromJSON) +importFrom(magrittr,"%>%") importFrom(pingr,ping) +importFrom(stats,median) +importFrom(stats,sd) +importFrom(tibble,tibble) importFrom(urltools,domain) importFrom(utils,globalVariables) diff --git a/NEWS.md b/NEWS.md index 9b4679b..09400b4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,2 +1,9 @@ +0.2.0 +* Updated pkg infrastructure (non-salient to operations) +* Now passes CRAN checks +* Updated user agent +* Ensured primary URLs for speedtest resources are HTTPS +* Swiched to {tinytest} + 0.1.0 * Initial release diff --git a/R/aaa.r b/R/aaa.r index 72c1813..ce4b46b 100644 --- a/R/aaa.r +++ b/R/aaa.r @@ -1,7 +1,13 @@ .base_raw <- charToRaw('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ') -.speedtest_ua <- "Mozilla/5.0 (Compatibe; r-speedtest/1.0; https://github.com/hrbrmstr/speedtest)" +.speedtest_ua <- "Mozilla/5.0 (Compatible; r-speedtest/1.0; https://gitlab.com/hrbrmstr/speedtest)" utils::globalVariables( - c("total", "latency_url", "test_result", "ping_time", "total_time", "retrieval_time", - "bw", "size", "secs")) \ No newline at end of file + c( + "total", "latency_url", "test_result", "ping_time", "total_time", + "retrieval_time", "bw", "size", "secs", "id" + ) +) + +sGET <- purrr::safely(httr::GET) +sPOST <- purrr::safely(httr::POST) diff --git a/R/bestest.r b/R/bestest.r index 614dffe..d83773f 100644 --- a/R/bestest.r +++ b/R/bestest.r @@ -41,8 +41,9 @@ spd_best_servers <- function(servers=NULL, config=NULL, max=10) { curl::multi_run() purrr::map_df(.lat_dat, ~{ - data_frame( + tibble( latency_url = .x$url, + # TODO add some code to let this be a thing # ping_time = mean(pingr::ping(urltools::domain(.x$url)), na.rm=TRUE)/1000, total_time = .x$times["total"], retrieval_time = .x$times[6] - .x$times[5], diff --git a/R/config.r b/R/config.r index 5d1c1f7..37e42fb 100644 --- a/R/config.r +++ b/R/config.r @@ -7,7 +7,10 @@ #' } spd_config <- function() { - res <- httr::GET("http://www.speedtest.net/speedtest-config.php") + httr::GET( + url = "https://www.speedtest.net/speedtest-config.php", + httr::user_agent(.speedtest_ua) + ) -> res httr::stop_for_status(res) diff --git a/R/servers.r b/R/servers.r index dd67add..734fef2 100644 --- a/R/servers.r +++ b/R/servers.r @@ -11,15 +11,18 @@ #' } spd_servers <- function(config=NULL) { - res <- httr::GET("https://www.speedtest.net/speedtest-servers-static.php") + httr::GET( + url = "https://www.speedtest.net/speedtest-servers-static.php", + httr::user_agent(.speedtest_ua) + ) -> res httr::stop_for_status(res) if (is.null(config)) config <- spd_config() - httr::content(res, as="text", encoding="UTF-8") %>% - read_xml() %>% - xml2::xml_find_all(xpath="//settings/servers/server") %>% + httr::content(res, as = "text", encoding = "UTF-8") %>% + xml2::read_xml() %>% + xml2::xml_find_all(xpath = "//settings/servers/server") %>% purrr::map_df(~{ list( url = xml2::xml_attr(.x, "url") %||% NA_character_, diff --git a/R/speedtest-package.R b/R/speedtest-package.R index fad61df..2f4f2bc 100644 --- a/R/speedtest-package.R +++ b/R/speedtest-package.R @@ -1,6 +1,6 @@ #' Tools to Test and Compare Internet Bandwidth Speeds #' -#' The 'Ookla' 'Speedtest' site provides +#' The 'Ookla' 'Speedtest' site provides #' interactive and programmatic services to test and compare bandwidth speeds #' from a source node on the Internet to thousands of test servers. Tools are #' provided to obtain test server lists, identify target servers for testing and @@ -12,9 +12,11 @@ #' @author Bob Rudis (bob@@rud.is) #' @import purrr xml2 httr cli crayon #' @importFrom utils globalVariables -#' @importFrom dplyr left_join arrange filter data_frame select summarise mutate +#' @importFrom tibble tibble +#' @importFrom dplyr left_join arrange filter select summarise mutate #' @importFrom jsonlite fromJSON #' @importFrom curl curl_fetch_multi multi_run #' @importFrom pingr ping #' @importFrom urltools domain -NULL +#' @importFrom stats median sd +"_PACKAGE" diff --git a/R/test-main.r b/R/test-main.r index edadce1..aa49f64 100644 --- a/R/test-main.r +++ b/R/test-main.r @@ -22,15 +22,17 @@ spd_test <- function() { cat(cyan("Determining best server...\n")) servers <- spd_closest_servers(servers, config) -# best <- servers + # best <- servers best <- spd_best_servers(servers, config, max=3) - cat(green("Initiating test from ") %+% white(config$client$isp) %+% green(" (") %+% - white(config$client$ip) %+% green(") to ") %+% white(best$sponsor[1]) %+% - green(" (") %+% white(best$name[1]) %+% green(")\n\n")) + cat( + green("Initiating test from ") %+% white(config$client$isp) %+% green(" (") %+% + white(config$client$ip) %+% green(") to ") %+% white(best$sponsor[1]) %+% + green(" (") %+% white(best$name[1]) %+% green(")\n\n") + ) cat(white$bold("Analyzing download speed")) - down <- spd_download_test(best, config, FALSE, timeout=5, .progress="dots") + down <- spd_download_test(best, config, FALSE, timeout = 5, .progress = "dots") cat(green("Download: ") %+% white$bold(nice_speed(max(down$bw))) %+% "\n") diff --git a/R/upload.r b/R/upload.r index 889488c..681b4b1 100644 --- a/R/upload.r +++ b/R/upload.r @@ -25,7 +25,8 @@ #' @note speed/bandwidth values are in Mbits/s; these tests consume bandwidth so #' if you're on a metered connection, you may incur charges. #' @export -spd_upload_test <- function(server, config=NULL, summarise=TRUE, timeout=60, .progress="dplyr") { +spd_upload_test <- function(server, config = NULL, summarise = TRUE, timeout=60, + .progress = "dplyr") { if (nrow(server) > 1) server <- server[1,] @@ -55,9 +56,14 @@ spd_upload_test <- function(server, config=NULL, summarise=TRUE, timeout=60, .pr if (.progress == 'dots') cat("\n", sep="") if (summarise) { - out <- dplyr::summarise(out, min=min(bw, na.rm=TRUE), mean=mean(bw, na.rm=TRUE), - median=median(bw, na.rm=TRUE), max=max(bw, na.rm=TRUE), - sd=sd(bw, na.rm=TRUE)) + dplyr::summarise( + out, + min = min(bw, na.rm = TRUE), + mean = mean(bw, na.rm = TRUE), + median = median(bw, na.rm = TRUE), + max = max(bw, na.rm = TRUE), + sd = sd(bw, na.rm = TRUE) + ) -> out } out$id <- server$id diff --git a/R/util.r b/R/util.r index 19abf01..99c4539 100644 --- a/R/util.r +++ b/R/util.r @@ -1,17 +1,13 @@ -sGET <- purrr::safely(httr::GET) -sPOST <- purrr::safely(httr::POST) - - .download_one <- function(url, timeout) { sGET( url = url, httr::add_headers( - `Referer` = "http://c.speedtest.net/flash/speedtest.swf", + `Referer` = "https://c.speedtest.net/flash/speedtest.swf", `Cache-Control` = "no-cache" # try to bust transparent proxy caches ), httr::user_agent(.speedtest_ua), httr::timeout(timeout), - query=list(ts=as.numeric(Sys.time())) # try to bust transparent proxy caches + query = list(ts = as.numeric(Sys.time())) # try to bust transparent proxy caches ) } @@ -19,15 +15,15 @@ sPOST <- purrr::safely(httr::POST) sPOST( url = url, httr::add_headers( - `Referer` = "http://c.speedtest.net/flash/speedtest.swf", + `Referer` = "https://c.speedtest.net/flash/speedtest.swf", `Connection` = "Keep-Alive", `Cache-Control` = "no-cache" # try to bust transparent proxy caches ), encode="form", - body=dat, + body = dat, httr::user_agent(.speedtest_ua), httr::timeout(timeout), - query=list(ts=as.numeric(Sys.time())) # try to bust transparent proxy caches + query = list(ts = as.numeric(Sys.time())) # try to bust transparent proxy caches ) } @@ -38,6 +34,7 @@ sPOST <- purrr::safely(httr::POST) #' - Only chooses between Kbit/s, Mbit/s, and Gbit/s #' #' @param number numeric The speed to be converted +#' @export #' @return character The character representation of the speed nice_speed <- function(number) { if (number < 1) { diff --git a/R/utils-pipe.R b/R/utils-pipe.R new file mode 100644 index 0000000..e79f3d8 --- /dev/null +++ b/R/utils-pipe.R @@ -0,0 +1,11 @@ +#' Pipe operator +#' +#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. +#' +#' @name %>% +#' @rdname pipe +#' @keywords internal +#' @export +#' @importFrom magrittr %>% +#' @usage lhs \%>\% rhs +NULL diff --git a/README.Rmd b/README.Rmd index 8361921..e14ed4b 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,34 +1,32 @@ --- title: "speedtest" -output: - github_document: - html_preview: true +output: rmarkdown::github_document +editor_options: + chunk_output_type: console --- -```{r include=FALSE} -knitr::opts_chunk$set(cache=TRUE, message=FALSE, warning=FALSE, error=FALSE, fig.retina=2) +```{r pkg-knitr-opts, include=FALSE} +hrbrpkghelpr::global_opts() ``` + +```{r badges, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::stinking_badges() +``` + +# speedtest + Tools to Test and Compare Internet Bandwidth Speeds ## Description -The 'Ookla' 'Speedtest' site provides -interactive and programmatic services to test and compare bandwidth speeds from -a source node on the Internet to thousands of test servers. Tools are provided -to obtain test server lists, identify target servers for testing and performing -speed/bandwidth tests. +The 'Ookla' 'Speedtest' site provides interactive and programmatic services to test and compare bandwidth speeds from a source node on the Internet to thousands of test servers. Tools are provided to obtain test server lists, identify target servers for testing and performing speed/bandwidth tests. ## What's Inside The Tin The following functions are implemented: -- `spd_best_servers`: Find "best" servers (latency-wise) from master server list -- `spd_closest_servers`: Find "closest" servers (geography-wise) from master server list -- `spd_compute_bandwidth`: Compute bandwidth from bytes transferred and time taken -- `spd_config`: Retrieve client configuration information for the speedtest -- `spd_download_test`: Perform a download speed/bandwidth test -- `spd_servers`: Retrieve a list of SpeedTest servers -- `spd_upload_test`: Perform an upload speed/bandwidth test -- `spd_test`: Test your internet speed/bandwidth +```{r ingredients, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::describe_ingredients() +``` ## Make a CLI utility @@ -38,7 +36,7 @@ While you can run `spd_test()` from an R console, it was desgined to be an easil which will look something like: -![](imgs/spdtst.gif) +![](man/figures/spdtst.gif) ## TODO @@ -56,17 +54,13 @@ Folks interested in contributing can take a look at the TODOs and pick as many a ## Installation -```{r eval=FALSE} -devtools::install_github("hrbrmstr/speedtest") -``` - -```{r} -options(width=120) +```{r install-ex, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::install_block() ``` ## Usage -```{r cache=FALSE} +```{r libs, cache=FALSE} library(speedtest) library(stringi) library(hrbrthemes) @@ -79,7 +73,7 @@ packageVersion("speedtest") ### Download Speed -```{r} +```{r dl-speeed, cache=TRUE} config <- spd_config() servers <- spd_servers(config=config) @@ -89,7 +83,7 @@ only_the_best_severs <- spd_best_servers(closest_servers, config) ### Individual download tests -```{r} +```{r individ-dl, cache=TRUE} glimpse(spd_download_test(closest_servers[1,], config=config)) glimpse(spd_download_test(only_the_best_severs[1,], config=config)) @@ -97,7 +91,7 @@ glimpse(spd_download_test(only_the_best_severs[1,], config=config)) ### Individual upload tests -```{r} +```{r individ-up, cache=TRUE} glimpse(spd_upload_test(only_the_best_severs[1,], config=config)) glimpse(spd_upload_test(closest_servers[1,], config=config)) @@ -107,7 +101,7 @@ glimpse(spd_upload_test(closest_servers[1,], config=config)) Choose closest, "best" and randomly (there can be, and are, some dups as a result for best/closest), run the test and chart the results. This will show just how disparate the results are from these core/crude tests. Most of the test servers compensate when they present the results. Newer, "socket"-based tests are more accurate but there are no free/hidden exposed APIs yet for most of them. -```{r} +```{r moar-dl-tests, cache=TRUE} set.seed(8675309) bind_rows( @@ -127,15 +121,11 @@ bind_rows( ungroup() -> to_compare select(to_compare, sponsor, name, country, host, type) -``` -```{r} map_df(1:nrow(to_compare), ~{ spd_download_test(to_compare[.x,], config=config, summarise=FALSE, timeout=30) }) -> dl_results_full -``` -```{r} mutate(dl_results_full, type=stri_trans_totitle(type)) %>% ggplot(aes(type, bw, fill=type)) + geom_quasirandom(aes(size=size, color=type), width=0.15, shape=21, stroke=0.25) + @@ -153,7 +143,7 @@ mutate(dl_results_full, type=stri_trans_totitle(type)) %>% Choose closest and "best" and filter duplicates out since we're really trying to measure here vs show the disparity: -```{r} +```{r moar-ul-tests, cache=TRUE} bind_rows( closest_servers[1:3,] %>% mutate(type="closest"), only_the_best_severs[1:3,] %>% mutate(type="best") @@ -165,9 +155,7 @@ select(to_compare, sponsor, name, country, host, type) map_df(1:nrow(to_compare), ~{ spd_upload_test(to_compare[.x,], config=config, summarise=FALSE, timeout=30) }) -> ul_results_full -``` -```{r} ggplot(ul_results_full, aes(x="Upload Test", y=bw)) + geom_quasirandom(aes(size=size, fill="col"), width=0.1, shape=21, stroke=0.25, color="#2b2b2b") + scale_y_continuous(expand=c(0,0.5)) + @@ -181,10 +169,10 @@ ggplot(ul_results_full, aes(x="Upload Test", y=bw)) + ## speedtest Metrics -```{r echo=FALSE} +```{r cloc, echo=FALSE} cloc::cloc_pkg_md() ``` ## Code of Conduct -Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. \ No newline at end of file +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. \ No newline at end of file diff --git a/README.gfm-ascii_identifiers b/README.gfm-ascii_identifiers deleted file mode 100644 index 4a8f2db..0000000 --- a/README.gfm-ascii_identifiers +++ /dev/null @@ -1,312 +0,0 @@ -speedtest -================ - -Tools to Test and Compare Internet Bandwidth Speeds - -## Description - -The ‘Ookla’ ‘Speedtest’ site provides -interactive and programmatic services to test and compare bandwidth -speeds from a source node on the Internet to thousands of test servers. -Tools are provided to obtain test server lists, identify target servers -for testing and performing speed/bandwidth tests. - -## What’s Inside The Tin - -The following functions are implemented: - - - `spd_best_servers`: Find “best” servers (latency-wise) from master - server list - - `spd_closest_servers`: Find “closest” servers (geography-wise) from - master server list - - `spd_compute_bandwidth`: Compute bandwidth from bytes transferred - and time taken - - `spd_config`: Retrieve client configuration information for the - speedtest - - `spd_download_test`: Perform a download speed/bandwidth test - - `spd_servers`: Retrieve a list of SpeedTest servers - - `spd_upload_test`: Perform an upload speed/bandwidth test - - `spd_test`: Test your internet speed/bandwidth - -## Make a CLI utility - -While you can run `spd_test()` from an R console, it was desgined to be -an easily wrapped into a `bash` (et al) alias or put into a small batch -script. Or, you can just type out the following if you’re -fleet-of-finger/have dexterous digits: - - Rscript --quiet -e 'speedtest::spd_test()' - -which will look something like: - -![](imgs/spdtst.gif) - -## TODO - -Folks interested in contributing can take a look at the TODOs and pick -as many as you like\! Ones with question marks are truly a “I dunno if -we shld” kinda thing. Ones with exclamation marks are essentials. - - - \[ \] Cache config in memory at startup vs pass around to functions? - - \[ \] Figure out how to use beta sockets hidden API vs the old Flash - API? - - \[ \] Ensure the efficacy of relying on the cURL timings for speed - measures for the Flash API - - \[ \] Figure out best way to capture the results for post-processing - - \[ \] Upload results to speedtest (tis only fair)\! - - \[ \] Incorporate more network or host measures for better - statistical determination of the best target\! - - \[ \] `autoplot` support\! - - \[ \] RStudio Add-in - - \[ \] Shiny app? - -## Installation - -``` r -devtools::install_github("hrbrmstr/speedtest") -``` - -``` r -options(width=120) -``` - -## Usage - -``` r -library(speedtest) -library(stringi) -library(hrbrthemes) -library(ggbeeswarm) -library(tidyverse) - -# current verison -packageVersion("speedtest") -``` - - ## [1] '0.1.0' - -### Download Speed - -``` r -config <- spd_config() - -servers <- spd_servers(config=config) -closest_servers <- spd_closest_servers(servers, config=config) -only_the_best_severs <- spd_best_servers(closest_servers, config) -``` - -### Individual download tests - -``` r -glimpse(spd_download_test(closest_servers[1,], config=config)) -``` - - ## Observations: 1 - ## Variables: 15 - ## $ url "http://speed0.xcelx.net/speedtest/upload.php" - ## $ lat 42.3875 - ## $ lng -71.1 - ## $ name "Somerville, MA" - ## $ country "United States" - ## $ cc "US" - ## $ sponsor "Axcelx Technologies LLC" - ## $ id "5960" - ## $ host "speed0.xcelx.net:8080" - ## $ url2 "http://speed1.xcelx.net/speedtest/upload.php" - ## $ min 13.24172 - ## $ mean 54.31822 - ## $ median 52.28935 - ## $ max 83.77728 - ## $ sd 26.88115 - -``` r -glimpse(spd_download_test(only_the_best_severs[1,], config=config)) -``` - - ## Observations: 1 - ## Variables: 18 - ## $ ping_time NaN - ## $ total_time 0.100793 - ## $ retrieval_time 2.3e-05 - ## $ url "http://stosat-ndhm-01.sys.comcast.net/speedtest/upload.php" - ## $ lat 42.3578 - ## $ lng -71.0617 - ## $ name "Boston, MA" - ## $ country "United States" - ## $ cc "US" - ## $ sponsor "Comcast" - ## $ id "1774" - ## $ host "stosat-ndhm-01.sys.comcast.net:8080" - ## $ url2 "http://a-stosat-ndhm-01.sys.comcast.net/speedtest/upload.php" - ## $ min 13.7987 - ## $ mean 73.27741 - ## $ median 78.4501 - ## $ max 138.8271 - ## $ sd 44.21786 - -### Individual upload tests - -``` r -glimpse(spd_upload_test(only_the_best_severs[1,], config=config)) -``` - - ## Observations: 1 - ## Variables: 18 - ## $ ping_time NaN - ## $ total_time 0.100793 - ## $ retrieval_time 2.3e-05 - ## $ url "http://stosat-ndhm-01.sys.comcast.net/speedtest/upload.php" - ## $ lat 42.3578 - ## $ lng -71.0617 - ## $ name "Boston, MA" - ## $ country "United States" - ## $ cc "US" - ## $ sponsor "Comcast" - ## $ id "1774" - ## $ host "stosat-ndhm-01.sys.comcast.net:8080" - ## $ url2 "http://a-stosat-ndhm-01.sys.comcast.net/speedtest/upload.php" - ## $ min 3.868808 - ## $ mean 6.25797 - ## $ median 6.165482 - ## $ max 8.921862 - ## $ sd 1.796898 - -``` r -glimpse(spd_upload_test(closest_servers[1,], config=config)) -``` - - ## Observations: 1 - ## Variables: 15 - ## $ url "http://speed0.xcelx.net/speedtest/upload.php" - ## $ lat 42.3875 - ## $ lng -71.1 - ## $ name "Somerville, MA" - ## $ country "United States" - ## $ cc "US" - ## $ sponsor "Axcelx Technologies LLC" - ## $ id "5960" - ## $ host "speed0.xcelx.net:8080" - ## $ url2 "http://speed1.xcelx.net/speedtest/upload.php" - ## $ min 3.554852 - ## $ mean 9.124757 - ## $ median 10.5464 - ## $ max 11.94891 - ## $ sd 3.464799 - -### Moar download tests - -Choose closest, “best” and randomly (there can be, and are, some dups as -a result for best/closest), run the test and chart the results. This -will show just how disparate the results are from these core/crude -tests. Most of the test servers compensate when they present the -results. Newer, “socket”-based tests are more accurate but there are no -free/hidden exposed APIs yet for most of them. - -``` r -set.seed(8675309) - -bind_rows( - - closest_servers[1:3,] %>% - mutate(type="closest"), - - only_the_best_severs[1:3,] %>% - mutate(type="best"), - - filter(servers, !(id %in% c(closest_servers[1:3,]$id, only_the_best_severs[1:3,]$id))) %>% - sample_n(3) %>% - mutate(type="random") - -) %>% - group_by(type) %>% - ungroup() -> to_compare - -select(to_compare, sponsor, name, country, host, type) -``` - - ## # A tibble: 9 x 5 - ## sponsor name country host type - ## - ## 1 Axcelx Technologies LLC Somerville, MA United States speed0.xcelx.net:8080 closest - ## 2 Comcast Boston, MA United States stosat-ndhm-01.sys.comcast.net:8080 closest - ## 3 Starry, Inc. Boston, MA United States speedtest-server.starry.com:8080 closest - ## 4 Comcast Boston, MA United States stosat-ndhm-01.sys.comcast.net:8080 best - ## 5 Axcelx Technologies LLC Somerville, MA United States speed0.xcelx.net:8080 best - ## 6 Norwood Light Broadband Norwood, MA United States speedtest.norwoodlight.com:8080 best - ## 7 Rudzkie Sieci Komputerowe Ruda Śląska Poland sp1.rsknet.pl:8080 random - ## 8 AT&T Los Angeles, CA United States lax.speedtest.sbcglobal.net:8080 random - ## 9 UP Telecom Lucena Brazil sp1.bandalargaup.com.br:8080 random - -``` r -map_df(1:nrow(to_compare), ~{ - spd_download_test(to_compare[.x,], config=config, summarise=FALSE, timeout=30) -}) -> dl_results_full -``` - -``` r -mutate(dl_results_full, type=stri_trans_totitle(type)) %>% - ggplot(aes(type, bw, fill=type)) + - geom_quasirandom(aes(size=size, color=type), width=0.15, shape=21, stroke=0.25) + - scale_y_continuous(expand=c(0,5), labels=c(sprintf("%s", seq(0,150,50)), "200 Mb/s"), limits=c(0,200)) + - scale_size(range=c(2,6)) + - scale_color_manual(values=c(Random="#b2b2b2", Best="#2b2b2b", Closest="#2b2b2b")) + - scale_fill_ipsum() + - labs(x=NULL, y=NULL, title="Download bandwidth test by selected server type", - subtitle="Circle size scaled by size of file used in that speed test") + - theme_ipsum_rc(grid="Y") + - theme(legend.position="none") -``` - - - -### Moar upload tests - -Choose closest and “best” and filter duplicates out since we’re really -trying to measure here vs show the disparity: - -``` r -bind_rows( - closest_servers[1:3,] %>% mutate(type="closest"), - only_the_best_severs[1:3,] %>% mutate(type="best") -) %>% - distinct(.keep_all=TRUE) -> to_compare - -select(to_compare, sponsor, name, country, host, type) -``` - - ## # A tibble: 6 x 5 - ## sponsor name country host type - ## - ## 1 Axcelx Technologies LLC Somerville, MA United States speed0.xcelx.net:8080 closest - ## 2 Comcast Boston, MA United States stosat-ndhm-01.sys.comcast.net:8080 closest - ## 3 Starry, Inc. Boston, MA United States speedtest-server.starry.com:8080 closest - ## 4 Comcast Boston, MA United States stosat-ndhm-01.sys.comcast.net:8080 best - ## 5 Axcelx Technologies LLC Somerville, MA United States speed0.xcelx.net:8080 best - ## 6 Norwood Light Broadband Norwood, MA United States speedtest.norwoodlight.com:8080 best - -``` r -map_df(1:nrow(to_compare), ~{ - spd_upload_test(to_compare[.x,], config=config, summarise=FALSE, timeout=30) -}) -> ul_results_full -``` - -``` r -ggplot(ul_results_full, aes(x="Upload Test", y=bw)) + - geom_quasirandom(aes(size=size, fill="col"), width=0.1, shape=21, stroke=0.25, color="#2b2b2b") + - scale_y_continuous(expand=c(0,0.5), breaks=seq(0,16,4), - labels=c(sprintf("%s", seq(0,12,4)), "16 Mb/s"), limits=c(0,16)) + - scale_size(range=c(2,6)) + - scale_fill_ipsum() + - labs(x=NULL, y=NULL, title="Upload bandwidth test by selected server type", - subtitle="Circle size scaled by size of file used in that speed test") + - theme_ipsum_rc(grid="Y") + - theme(legend.position="none") -``` - - - -## Code of Conduct - -Please note that this project is released with a [Contributor Code of -Conduct](CONDUCT.md). By participating in this project you agree to -abide by its terms. diff --git a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-10-1.png b/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-10-1.png deleted file mode 100644 index 566a5e1..0000000 Binary files a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-10-1.png and /dev/null differ diff --git a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-11-1.png b/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-11-1.png deleted file mode 100644 index 3429516..0000000 Binary files a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-11-1.png and /dev/null differ diff --git a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-12-1.png b/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-12-1.png deleted file mode 100644 index 2811c8a..0000000 Binary files a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-12-1.png and /dev/null differ diff --git a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-1.png b/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-1.png deleted file mode 100644 index 307fa94..0000000 Binary files a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-1.png and /dev/null differ diff --git a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-7-1.png b/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-7-1.png deleted file mode 100644 index 3026df5..0000000 Binary files a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-7-1.png and /dev/null differ diff --git a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-9-1.png b/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-9-1.png deleted file mode 100644 index 2decd75..0000000 Binary files a/README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-9-1.png and /dev/null differ diff --git a/README.md b/README.md index b579667..8bfaaf0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,23 @@ speedtest ================ +[![Project Status: Active – The project has reached a stable, usable +state and is being actively +developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) +[![Signed +by](https://img.shields.io/badge/Keybase-Verified-brightgreen.svg)](https://keybase.io/hrbrmstr) +![Signed commit +%](https://img.shields.io/badge/Signed_Commits-21.7%25-lightgrey.svg) +[![Linux build +Status](https://travis-ci.org/hrbrmstr/speedtest.svg?branch=master)](https://travis-ci.org/hrbrmstr/speedtest) +[![Coverage +Status](https://codecov.io/gh/hrbrmstr/speedtest/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/speedtest) +![Minimal R +Version](https://img.shields.io/badge/R%3E%3D-3.2.0-blue.svg) +![License](https://img.shields.io/badge/License-MIT-blue.svg) + +# speedtest + Tools to Test and Compare Internet Bandwidth Speeds ## Description @@ -15,6 +32,9 @@ for testing and performing speed/bandwidth tests. The following functions are implemented: + - `nice_speed`: Convert a test speed, in Mbits/s, to its string + representation along with appropriate units for the magnitude of the + test speed - `spd_best_servers`: Find “best” servers (latency-wise) from master server list - `spd_closest_servers`: Find “closest” servers (geography-wise) from @@ -25,8 +45,8 @@ The following functions are implemented: speedtest - `spd_download_test`: Perform a download speed/bandwidth test - `spd_servers`: Retrieve a list of SpeedTest servers - - `spd_upload_test`: Perform an upload speed/bandwidth test - `spd_test`: Test your internet speed/bandwidth + - `spd_upload_test`: Perform an upload speed/bandwidth test ## Make a CLI utility @@ -39,7 +59,7 @@ fleet-of-finger/have dexterous digits: which will look something like: -![](imgs/spdtst.gif) +![](man/figures/spdtst.gif) ## TODO @@ -63,12 +83,21 @@ we shld” kinda thing. Ones with exclamation marks are essentials. ## Installation ``` r -devtools::install_github("hrbrmstr/speedtest") +install.packages("speedtest", repos = "https://cinc.rud.is") +# or +remotes::install_git("https://git.rud.is/hrbrmstr/speedtest.git") +# or +remotes::install_git("https://git.sr.ht/~hrbrmstr/speedtest") +# or +remotes::install_gitlab("hrbrmstr/speedtest") +# or +remotes::install_bitbucket("hrbrmstr/speedtest") +# or +remotes::install_github("hrbrmstr/speedtest") ``` -``` r -options(width=120) -``` +NOTE: To use the ‘remotes’ install options you will need to have the +[{remotes} package](https://github.com/r-lib/remotes) installed. ## Usage @@ -81,10 +110,9 @@ library(tidyverse) # current verison packageVersion("speedtest") +## [1] '0.2.0' ``` - ## [1] '0.1.0' - ### Download Speed ``` r @@ -99,100 +127,90 @@ only_the_best_severs <- spd_best_servers(closest_servers, config) ``` r glimpse(spd_download_test(closest_servers[1,], config=config)) -``` - - ## Observations: 1 - ## Variables: 15 - ## $ url "http://speed0.xcelx.net/speedtest/upload.php" - ## $ lat 42.3875 - ## $ lng -71.1 - ## $ name "Somerville, MA" - ## $ country "United States" - ## $ cc "US" - ## $ sponsor "Axcelx Technologies LLC" - ## $ id "5960" - ## $ host "speed0.xcelx.net:8080" - ## $ url2 "http://speed1.xcelx.net/speedtest/upload.php" - ## $ min 14.40439 - ## $ mean 60.06834 - ## $ median 55.28457 - ## $ max 127.9436 - ## $ sd 34.20695 +## Observations: 1 +## Variables: 15 +## $ url "http://oak-speedtest.otelco.com:8080/speedtest/upload.php" +## $ lat 43.6614 +## $ lng -70.2558 +## $ name "Portland, ME" +## $ country "United States" +## $ cc "US" +## $ sponsor "Otelco" +## $ id "1037" +## $ host "oak-speedtest.otelco.com:8080" +## $ url2 "http://66.181.127.42/speedtest/upload.php" +## $ min 12.16723 +## $ mean 14.91807 +## $ median 14.57376 +## $ max 17.30854 +## $ sd 1.736132 -``` r glimpse(spd_download_test(only_the_best_severs[1,], config=config)) +## Observations: 1 +## Variables: 17 +## $ total_time 0.075129 +## $ retrieval_time 2.8e-05 +## $ url "http://stosat-ndhm-01.sys.comcast.net:8080/speedtest/upload.php" +## $ lat 42.3578 +## $ lng -71.0617 +## $ name "Boston, MA" +## $ country "United States" +## $ cc "US" +## $ sponsor "Comcast" +## $ id "1774" +## $ host "stosat-ndhm-01.sys.comcast.net:8080" +## $ url2 "http://a-stosat-ndhm-01.sys.comcast.net/speedtest/upload.php" +## $ min 14.49186 +## $ mean 17.68452 +## $ median 16.75617 +## $ max 24.3737 +## $ sd 2.987197 ``` - ## Observations: 1 - ## Variables: 18 - ## $ ping_time 0.02712567 - ## $ total_time 0.059917 - ## $ retrieval_time 2.3e-05 - ## $ url "http://speed0.xcelx.net/speedtest/upload.php" - ## $ lat 42.3875 - ## $ lng -71.1 - ## $ name "Somerville, MA" - ## $ country "United States" - ## $ cc "US" - ## $ sponsor "Axcelx Technologies LLC" - ## $ id "5960" - ## $ host "speed0.xcelx.net:8080" - ## $ url2 "http://speed1.xcelx.net/speedtest/upload.php" - ## $ min 14.64922 - ## $ mean 56.15303 - ## $ median 51.89162 - ## $ max 107.5084 - ## $ sd 31.8866 - ### Individual upload tests ``` r glimpse(spd_upload_test(only_the_best_severs[1,], config=config)) -``` - - ## Observations: 1 - ## Variables: 18 - ## $ ping_time 0.02712567 - ## $ total_time 0.059917 - ## $ retrieval_time 2.3e-05 - ## $ url "http://speed0.xcelx.net/speedtest/upload.php" - ## $ lat 42.3875 - ## $ lng -71.1 - ## $ name "Somerville, MA" - ## $ country "United States" - ## $ cc "US" - ## $ sponsor "Axcelx Technologies LLC" - ## $ id "5960" - ## $ host "speed0.xcelx.net:8080" - ## $ url2 "http://speed1.xcelx.net/speedtest/upload.php" - ## $ min 6.240858 - ## $ mean 9.527599 - ## $ median 9.303148 - ## $ max 12.56686 - ## $ sd 2.451778 +## Observations: 1 +## Variables: 17 +## $ total_time 0.075129 +## $ retrieval_time 2.8e-05 +## $ url "http://stosat-ndhm-01.sys.comcast.net:8080/speedtest/upload.php" +## $ lat 42.3578 +## $ lng -71.0617 +## $ name "Boston, MA" +## $ country "United States" +## $ cc "US" +## $ sponsor "Comcast" +## $ id "1774" +## $ host "stosat-ndhm-01.sys.comcast.net:8080" +## $ url2 "http://a-stosat-ndhm-01.sys.comcast.net/speedtest/upload.php" +## $ min 9.951216 +## $ mean 20.33949 +## $ median 22.11265 +## $ max 23.4545 +## $ sd 5.148238 -``` r glimpse(spd_upload_test(closest_servers[1,], config=config)) +## Observations: 1 +## Variables: 15 +## $ url "http://oak-speedtest.otelco.com:8080/speedtest/upload.php" +## $ lat 43.6614 +## $ lng -70.2558 +## $ name "Portland, ME" +## $ country "United States" +## $ cc "US" +## $ sponsor "Otelco" +## $ id "1037" +## $ host "oak-speedtest.otelco.com:8080" +## $ url2 "http://66.181.127.42/speedtest/upload.php" +## $ min 5.646166 +## $ mean 16.96393 +## $ median 19.76833 +## $ max 22.18757 +## $ sd 6.542608 ``` - ## Observations: 1 - ## Variables: 15 - ## $ url "http://speed0.xcelx.net/speedtest/upload.php" - ## $ lat 42.3875 - ## $ lng -71.1 - ## $ name "Somerville, MA" - ## $ country "United States" - ## $ cc "US" - ## $ sponsor "Axcelx Technologies LLC" - ## $ id "5960" - ## $ host "speed0.xcelx.net:8080" - ## $ url2 "http://speed1.xcelx.net/speedtest/upload.php" - ## $ min 6.764702 - ## $ mean 9.896179 - ## $ median 10.3605 - ## $ max 12.85389 - ## $ sd 2.359868 - ### Moar download tests Choose closest, “best” and randomly (there can be, and are, some dups as @@ -222,29 +240,23 @@ bind_rows( ungroup() -> to_compare select(to_compare, sponsor, name, country, host, type) -``` +## # A tibble: 9 x 5 +## sponsor name country host type +## +## 1 Otelco Portland, ME United States oak-speedtest.otelco.com:8080 closest +## 2 netBlazr Somerville, MA United States speed0.xcelx.net:8080 closest +## 3 Comcast Boston, MA United States stosat-ndhm-01.sys.comcast.net:8080 closest +## 4 Comcast Boston, MA United States stosat-ndhm-01.sys.comcast.net:8080 best +## 5 netBlazr Somerville, MA United States speed0.xcelx.net:8080 best +## 6 BELD Broadband Braintree, MA United States wotan.beld.net:8080 best +## 7 LLC Trans Analitika Novaya Usman Russian Federation speedtest-1.cnetvrn.ru:8080 random +## 8 VEGA Kharkiv Kharkiv Ukraine speedtest.vega.com.ua:8080 random +## 9 Oxylion S.A Katowice Poland speedtest-kat-01.oxylion.net.pl:8080 random - ## # A tibble: 9 x 5 - ## sponsor name country - ## - ## 1 Axcelx Technologies LLC Somerville, MA United States - ## 2 Comcast Boston, MA United States - ## 3 Starry, Inc. Boston, MA United States - ## 4 Axcelx Technologies LLC Somerville, MA United States - ## 5 Norwood Light Broadband Norwood, MA United States - ## 6 CCI - New England Providence, RI United States - ## 7 PirxNet Gliwice Poland - ## 8 Interoute VDC Los Angeles, CA United States - ## 9 UNPAD Bandung Indonesia - ## # ... with 2 more variables: host , type - -``` r map_df(1:nrow(to_compare), ~{ spd_download_test(to_compare[.x,], config=config, summarise=FALSE, timeout=30) }) -> dl_results_full -``` -``` r mutate(dl_results_full, type=stri_trans_totitle(type)) %>% ggplot(aes(type, bw, fill=type)) + geom_quasirandom(aes(size=size, color=type), width=0.15, shape=21, stroke=0.25) + @@ -258,7 +270,7 @@ mutate(dl_results_full, type=stri_trans_totitle(type)) %>% theme(legend.position="none") ``` - + ### Moar upload tests @@ -273,26 +285,20 @@ bind_rows( distinct(.keep_all=TRUE) -> to_compare select(to_compare, sponsor, name, country, host, type) -``` - - ## # A tibble: 6 x 5 - ## sponsor name country - ## - ## 1 Axcelx Technologies LLC Somerville, MA United States - ## 2 Comcast Boston, MA United States - ## 3 Starry, Inc. Boston, MA United States - ## 4 Axcelx Technologies LLC Somerville, MA United States - ## 5 Norwood Light Broadband Norwood, MA United States - ## 6 CCI - New England Providence, RI United States - ## # ... with 2 more variables: host , type +## # A tibble: 6 x 5 +## sponsor name country host type +## +## 1 Otelco Portland, ME United States oak-speedtest.otelco.com:8080 closest +## 2 netBlazr Somerville, MA United States speed0.xcelx.net:8080 closest +## 3 Comcast Boston, MA United States stosat-ndhm-01.sys.comcast.net:8080 closest +## 4 Comcast Boston, MA United States stosat-ndhm-01.sys.comcast.net:8080 best +## 5 netBlazr Somerville, MA United States speed0.xcelx.net:8080 best +## 6 BELD Broadband Braintree, MA United States wotan.beld.net:8080 best -``` r map_df(1:nrow(to_compare), ~{ spd_upload_test(to_compare[.x,], config=config, summarise=FALSE, timeout=30) }) -> ul_results_full -``` -``` r ggplot(ul_results_full, aes(x="Upload Test", y=bw)) + geom_quasirandom(aes(size=size, fill="col"), width=0.1, shape=21, stroke=0.25, color="#2b2b2b") + scale_y_continuous(expand=c(0,0.5)) + @@ -304,19 +310,18 @@ ggplot(ul_results_full, aes(x="Upload Test", y=bw)) + theme(legend.position="none") ``` - + ## speedtest Metrics | Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | | :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: | -| HTML | 1 | 0.06 | 819 | 0.73 | 10 | 0.07 | 0 | 0.00 | -| R | 13 | 0.81 | 215 | 0.19 | 70 | 0.51 | 167 | 0.68 | -| Rmd | 1 | 0.06 | 64 | 0.06 | 49 | 0.36 | 78 | 0.32 | -| make | 1 | 0.06 | 20 | 0.02 | 9 | 0.07 | 0 | 0.00 | +| R | 13 | 0.87 | 226 | 0.73 | 68 | 0.53 | 180 | 0.74 | +| Rmd | 1 | 0.07 | 64 | 0.21 | 51 | 0.40 | 63 | 0.26 | +| make | 1 | 0.07 | 20 | 0.06 | 9 | 0.07 | 0 | 0.00 | ## Code of Conduct -Please note that this project is released with a [Contributor Code of -Conduct](CONDUCT.md). By participating in this project you agree to -abide by its terms. +Please note that this project is released with a Contributor Code of +Conduct. By participating in this project you agree to abide by its +terms. diff --git a/README_cache/gfm/__packages b/README_cache/gfm/__packages index 1a1d8d4..6928cc6 100644 --- a/README_cache/gfm/__packages +++ b/README_cache/gfm/__packages @@ -12,6 +12,3 @@ purrr dplyr stringr forcats -bindrcpp -devtools -usethis diff --git a/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.RData b/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.RData new file mode 100644 index 0000000..f3ab2f8 Binary files /dev/null and b/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.RData differ diff --git a/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.rdb b/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.rdb new file mode 100644 index 0000000..4016ca2 Binary files /dev/null and b/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.rdb differ diff --git a/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.rdx b/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.rdx new file mode 100644 index 0000000..94b6042 Binary files /dev/null and b/README_cache/gfm/dl-speeed_31ed0600c0555b226365c572514c60ee.rdx differ diff --git a/README_cache/gfm/individ-dl_d8acf06a65b57ecf7a891dff9743a153.RData b/README_cache/gfm/individ-dl_d8acf06a65b57ecf7a891dff9743a153.RData new file mode 100644 index 0000000..b74b318 Binary files /dev/null and b/README_cache/gfm/individ-dl_d8acf06a65b57ecf7a891dff9743a153.RData differ diff --git a/README_cache/gfm/unnamed-chunk-7_c4f4f0b44c2fc2d6ee8870ae77830ebf.rdb b/README_cache/gfm/individ-dl_d8acf06a65b57ecf7a891dff9743a153.rdb similarity index 100% rename from README_cache/gfm/unnamed-chunk-7_c4f4f0b44c2fc2d6ee8870ae77830ebf.rdb rename to README_cache/gfm/individ-dl_d8acf06a65b57ecf7a891dff9743a153.rdb diff --git a/README_cache/gfm/individ-dl_d8acf06a65b57ecf7a891dff9743a153.rdx b/README_cache/gfm/individ-dl_d8acf06a65b57ecf7a891dff9743a153.rdx new file mode 100644 index 0000000..2a11481 Binary files /dev/null and b/README_cache/gfm/individ-dl_d8acf06a65b57ecf7a891dff9743a153.rdx differ diff --git a/README_cache/gfm/individ-up_bef9661be29204fe5a1fe1a9df42e3bf.RData b/README_cache/gfm/individ-up_bef9661be29204fe5a1fe1a9df42e3bf.RData new file mode 100644 index 0000000..5fe3dfa Binary files /dev/null and b/README_cache/gfm/individ-up_bef9661be29204fe5a1fe1a9df42e3bf.RData differ diff --git a/README_cache/gfm/unnamed-chunk-6_a08421919cfedfed307e2451eebc3090.rdb b/README_cache/gfm/individ-up_bef9661be29204fe5a1fe1a9df42e3bf.rdb similarity index 100% rename from README_cache/gfm/unnamed-chunk-6_a08421919cfedfed307e2451eebc3090.rdb rename to README_cache/gfm/individ-up_bef9661be29204fe5a1fe1a9df42e3bf.rdb diff --git a/README_cache/gfm/individ-up_bef9661be29204fe5a1fe1a9df42e3bf.rdx b/README_cache/gfm/individ-up_bef9661be29204fe5a1fe1a9df42e3bf.rdx new file mode 100644 index 0000000..2a11481 Binary files /dev/null and b/README_cache/gfm/individ-up_bef9661be29204fe5a1fe1a9df42e3bf.rdx differ diff --git a/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.RData b/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.RData new file mode 100644 index 0000000..57de9d0 Binary files /dev/null and b/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.RData differ diff --git a/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.rdb b/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.rdb new file mode 100644 index 0000000..f6762f7 Binary files /dev/null and b/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.rdb differ diff --git a/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.rdx b/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.rdx new file mode 100644 index 0000000..4e8e0fe Binary files /dev/null and b/README_cache/gfm/moar-dl-tests_21cafef69b9f6499b9aa8b2c347a598f.rdx differ diff --git a/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.RData b/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.RData new file mode 100644 index 0000000..55eb3b4 Binary files /dev/null and b/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.RData differ diff --git a/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.rdb b/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.rdb new file mode 100644 index 0000000..9dfe5d5 Binary files /dev/null and b/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.rdb differ diff --git a/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.rdx b/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.rdx new file mode 100644 index 0000000..6be7f23 Binary files /dev/null and b/README_cache/gfm/moar-ul-tests_8bc45b6683652bd85c8272cd2dabb5e1.rdx differ diff --git a/README_cache/gfm/unnamed-chunk-10_a05d32b06c329a82c57de508b8e165c1.RData b/README_cache/gfm/unnamed-chunk-10_a05d32b06c329a82c57de508b8e165c1.RData deleted file mode 100644 index 808c8e0..0000000 Binary files a/README_cache/gfm/unnamed-chunk-10_a05d32b06c329a82c57de508b8e165c1.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-10_a05d32b06c329a82c57de508b8e165c1.rdb b/README_cache/gfm/unnamed-chunk-10_a05d32b06c329a82c57de508b8e165c1.rdb deleted file mode 100644 index e69de29..0000000 diff --git a/README_cache/gfm/unnamed-chunk-10_a05d32b06c329a82c57de508b8e165c1.rdx b/README_cache/gfm/unnamed-chunk-10_a05d32b06c329a82c57de508b8e165c1.rdx deleted file mode 100644 index 98b509a..0000000 Binary files a/README_cache/gfm/unnamed-chunk-10_a05d32b06c329a82c57de508b8e165c1.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.RData b/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.RData deleted file mode 100644 index 48696b9..0000000 Binary files a/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.rdb b/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.rdb deleted file mode 100644 index ad15c31..0000000 Binary files a/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.rdb and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.rdx b/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.rdx deleted file mode 100644 index 463df2c..0000000 Binary files a/README_cache/gfm/unnamed-chunk-11_7def8c4e0574346221b17493aa83ccd1.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-12_c763d3cf0c31639005806c1f67aa0e19.RData b/README_cache/gfm/unnamed-chunk-12_c763d3cf0c31639005806c1f67aa0e19.RData deleted file mode 100644 index 13b0640..0000000 Binary files a/README_cache/gfm/unnamed-chunk-12_c763d3cf0c31639005806c1f67aa0e19.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-12_c763d3cf0c31639005806c1f67aa0e19.rdb b/README_cache/gfm/unnamed-chunk-12_c763d3cf0c31639005806c1f67aa0e19.rdb deleted file mode 100644 index e69de29..0000000 diff --git a/README_cache/gfm/unnamed-chunk-12_c763d3cf0c31639005806c1f67aa0e19.rdx b/README_cache/gfm/unnamed-chunk-12_c763d3cf0c31639005806c1f67aa0e19.rdx deleted file mode 100644 index 98b509a..0000000 Binary files a/README_cache/gfm/unnamed-chunk-12_c763d3cf0c31639005806c1f67aa0e19.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-13_ea042d41f7055d0784f2db8b8df9b01a.RData b/README_cache/gfm/unnamed-chunk-13_ea042d41f7055d0784f2db8b8df9b01a.RData deleted file mode 100644 index 002a447..0000000 Binary files a/README_cache/gfm/unnamed-chunk-13_ea042d41f7055d0784f2db8b8df9b01a.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-13_ea042d41f7055d0784f2db8b8df9b01a.rdb b/README_cache/gfm/unnamed-chunk-13_ea042d41f7055d0784f2db8b8df9b01a.rdb deleted file mode 100644 index e69de29..0000000 diff --git a/README_cache/gfm/unnamed-chunk-13_ea042d41f7055d0784f2db8b8df9b01a.rdx b/README_cache/gfm/unnamed-chunk-13_ea042d41f7055d0784f2db8b8df9b01a.rdx deleted file mode 100644 index c9ab0df..0000000 Binary files a/README_cache/gfm/unnamed-chunk-13_ea042d41f7055d0784f2db8b8df9b01a.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-2_5b0ba01bb43aefa1232c8b724a6601e4.RData b/README_cache/gfm/unnamed-chunk-2_5b0ba01bb43aefa1232c8b724a6601e4.RData deleted file mode 100644 index 9eeec78..0000000 Binary files a/README_cache/gfm/unnamed-chunk-2_5b0ba01bb43aefa1232c8b724a6601e4.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-2_5b0ba01bb43aefa1232c8b724a6601e4.rdb b/README_cache/gfm/unnamed-chunk-2_5b0ba01bb43aefa1232c8b724a6601e4.rdb deleted file mode 100644 index e69de29..0000000 diff --git a/README_cache/gfm/unnamed-chunk-2_5b0ba01bb43aefa1232c8b724a6601e4.rdx b/README_cache/gfm/unnamed-chunk-2_5b0ba01bb43aefa1232c8b724a6601e4.rdx deleted file mode 100644 index 16d09ac..0000000 Binary files a/README_cache/gfm/unnamed-chunk-2_5b0ba01bb43aefa1232c8b724a6601e4.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-3_c2d6adad80c87c748cd07e4fbf805a99.RData b/README_cache/gfm/unnamed-chunk-3_c2d6adad80c87c748cd07e4fbf805a99.RData deleted file mode 100644 index 0e4d8e5..0000000 Binary files a/README_cache/gfm/unnamed-chunk-3_c2d6adad80c87c748cd07e4fbf805a99.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-3_c2d6adad80c87c748cd07e4fbf805a99.rdb b/README_cache/gfm/unnamed-chunk-3_c2d6adad80c87c748cd07e4fbf805a99.rdb deleted file mode 100644 index e69de29..0000000 diff --git a/README_cache/gfm/unnamed-chunk-3_c2d6adad80c87c748cd07e4fbf805a99.rdx b/README_cache/gfm/unnamed-chunk-3_c2d6adad80c87c748cd07e4fbf805a99.rdx deleted file mode 100644 index 16d09ac..0000000 Binary files a/README_cache/gfm/unnamed-chunk-3_c2d6adad80c87c748cd07e4fbf805a99.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-4_bb201e0df1071cb65b54fdc9bebf413d.RData b/README_cache/gfm/unnamed-chunk-4_bb201e0df1071cb65b54fdc9bebf413d.RData deleted file mode 100644 index 0e966b0..0000000 Binary files a/README_cache/gfm/unnamed-chunk-4_bb201e0df1071cb65b54fdc9bebf413d.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-4_bb201e0df1071cb65b54fdc9bebf413d.rdb b/README_cache/gfm/unnamed-chunk-4_bb201e0df1071cb65b54fdc9bebf413d.rdb deleted file mode 100644 index e69de29..0000000 diff --git a/README_cache/gfm/unnamed-chunk-4_bb201e0df1071cb65b54fdc9bebf413d.rdx b/README_cache/gfm/unnamed-chunk-4_bb201e0df1071cb65b54fdc9bebf413d.rdx deleted file mode 100644 index 16d09ac..0000000 Binary files a/README_cache/gfm/unnamed-chunk-4_bb201e0df1071cb65b54fdc9bebf413d.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.RData b/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.RData deleted file mode 100644 index 0491bf8..0000000 Binary files a/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.rdb b/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.rdb deleted file mode 100644 index 2b5aca2..0000000 Binary files a/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.rdb and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.rdx b/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.rdx deleted file mode 100644 index b63131f..0000000 Binary files a/README_cache/gfm/unnamed-chunk-5_08af825d6f4cb3312e5f922882aff56f.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-6_a08421919cfedfed307e2451eebc3090.RData b/README_cache/gfm/unnamed-chunk-6_a08421919cfedfed307e2451eebc3090.RData deleted file mode 100644 index 463af02..0000000 Binary files a/README_cache/gfm/unnamed-chunk-6_a08421919cfedfed307e2451eebc3090.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-6_a08421919cfedfed307e2451eebc3090.rdx b/README_cache/gfm/unnamed-chunk-6_a08421919cfedfed307e2451eebc3090.rdx deleted file mode 100644 index 16d09ac..0000000 Binary files a/README_cache/gfm/unnamed-chunk-6_a08421919cfedfed307e2451eebc3090.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-7_c4f4f0b44c2fc2d6ee8870ae77830ebf.RData b/README_cache/gfm/unnamed-chunk-7_c4f4f0b44c2fc2d6ee8870ae77830ebf.RData deleted file mode 100644 index acbd3c7..0000000 Binary files a/README_cache/gfm/unnamed-chunk-7_c4f4f0b44c2fc2d6ee8870ae77830ebf.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-7_c4f4f0b44c2fc2d6ee8870ae77830ebf.rdx b/README_cache/gfm/unnamed-chunk-7_c4f4f0b44c2fc2d6ee8870ae77830ebf.rdx deleted file mode 100644 index 16d09ac..0000000 Binary files a/README_cache/gfm/unnamed-chunk-7_c4f4f0b44c2fc2d6ee8870ae77830ebf.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.RData b/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.RData deleted file mode 100644 index e44f245..0000000 Binary files a/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.rdb b/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.rdb deleted file mode 100644 index 730ba8b..0000000 Binary files a/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.rdb and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.rdx b/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.rdx deleted file mode 100644 index 1c195a1..0000000 Binary files a/README_cache/gfm/unnamed-chunk-8_589608964690a85b75a2c454d204378e.rdx and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.RData b/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.RData deleted file mode 100644 index 9cf9b55..0000000 Binary files a/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.RData and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.rdb b/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.rdb deleted file mode 100644 index 7c02803..0000000 Binary files a/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.rdb and /dev/null differ diff --git a/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.rdx b/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.rdx deleted file mode 100644 index 6240861..0000000 Binary files a/README_cache/gfm/unnamed-chunk-9_c2b4b56b83ed174d8c32859946fd3840.rdx and /dev/null differ diff --git a/README_files/figure-gfm/unnamed-chunk-10-1.png b/README_files/figure-gfm/unnamed-chunk-10-1.png deleted file mode 100644 index edfd1db..0000000 Binary files a/README_files/figure-gfm/unnamed-chunk-10-1.png and /dev/null differ diff --git a/README_files/figure-gfm/unnamed-chunk-11-1.png b/README_files/figure-gfm/unnamed-chunk-11-1.png deleted file mode 100644 index f2c3479..0000000 Binary files a/README_files/figure-gfm/unnamed-chunk-11-1.png and /dev/null differ diff --git a/README_files/figure-gfm/unnamed-chunk-12-1.png b/README_files/figure-gfm/unnamed-chunk-12-1.png deleted file mode 100644 index ebdce76..0000000 Binary files a/README_files/figure-gfm/unnamed-chunk-12-1.png and /dev/null differ diff --git a/README_files/figure-gfm/unnamed-chunk-9-1.png b/README_files/figure-gfm/unnamed-chunk-9-1.png deleted file mode 100644 index 00dc2e8..0000000 Binary files a/README_files/figure-gfm/unnamed-chunk-9-1.png and /dev/null differ diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..c6c1438 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,45 @@ +# DO NOT CHANGE the "init" and "install" sections below + +# Download script file from GitHub +init: + ps: | + $ErrorActionPreference = "Stop" + Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" + Import-Module '..\appveyor-tool.ps1' + +install: + ps: Bootstrap + +cache: + - C:\RLibrary + +# Adapt as necessary starting from here + +build_script: + - travis-tool.sh install_deps + +test_script: + - travis-tool.sh run_tests + +on_failure: + - 7z a failure.zip *.Rcheck\* + - appveyor PushArtifact failure.zip + +artifacts: + - path: '*.Rcheck\**\*.log' + name: Logs + + - path: '*.Rcheck\**\*.out' + name: Logs + + - path: '*.Rcheck\**\*.fail' + name: Logs + + - path: '*.Rcheck\**\*.Rout' + name: Logs + + - path: '\*_*.tar.gz' + name: Bits + + - path: '\*_*.zip' + name: Bits diff --git a/inst/tinytest/test_speedtest.R b/inst/tinytest/test_speedtest.R new file mode 100644 index 0000000..874b775 --- /dev/null +++ b/inst/tinytest/test_speedtest.R @@ -0,0 +1,8 @@ +library(speedtest) + +# speeds are displayed in appropriate units +expect_true(grepl("Kbit/s", nice_speed(0.1))) +expect_true(grepl("Mbit/s", nice_speed(1))) +expect_true(grepl("Gbit/s", nice_speed(1000))) + +expect_true(all(c("client", "odometer") %in% names(spd_config()))) diff --git a/man/figures/README-moar-dl-tests-1.png b/man/figures/README-moar-dl-tests-1.png new file mode 100644 index 0000000..865e67b Binary files /dev/null and b/man/figures/README-moar-dl-tests-1.png differ diff --git a/man/figures/README-moar-ul-tests-1.png b/man/figures/README-moar-ul-tests-1.png new file mode 100644 index 0000000..3bcbb0c Binary files /dev/null and b/man/figures/README-moar-ul-tests-1.png differ diff --git a/imgs/spdtst.gif b/man/figures/spdtst.gif similarity index 100% rename from imgs/spdtst.gif rename to man/figures/spdtst.gif diff --git a/man/nice_speed.Rd b/man/nice_speed.Rd new file mode 100644 index 0000000..325ffdf --- /dev/null +++ b/man/nice_speed.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/util.r +\name{nice_speed} +\alias{nice_speed} +\title{Convert a test speed, in Mbits/s, to its string representation along with +appropriate units for the magnitude of the test speed} +\usage{ +nice_speed(number) +} +\arguments{ +\item{number}{numeric The speed to be converted} +} +\value{ +character The character representation of the speed +} +\description{ +- Assumes number is in Mbits/s to start off with +- Only chooses between Kbit/s, Mbit/s, and Gbit/s +} diff --git a/man/pipe.Rd b/man/pipe.Rd new file mode 100644 index 0000000..0eec752 --- /dev/null +++ b/man/pipe.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils-pipe.R +\name{\%>\%} +\alias{\%>\%} +\title{Pipe operator} +\usage{ +lhs \%>\% rhs +} +\description{ +See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. +} +\keyword{internal} diff --git a/man/spd_download_test.Rd b/man/spd_download_test.Rd index 9ed32eb..6d147af 100644 --- a/man/spd_download_test.Rd +++ b/man/spd_download_test.Rd @@ -4,8 +4,8 @@ \alias{spd_download_test} \title{Perform a download speed/bandwidth test} \usage{ -spd_download_test(server, config = NULL, summarise = TRUE, timeout = 60, - .progress = "dplyr") +spd_download_test(server, config = NULL, summarise = TRUE, + timeout = 60, .progress = "dplyr") } \arguments{ \item{server}{a data frame row from one of the functions that retrieves or diff --git a/man/spd_upload_test.Rd b/man/spd_upload_test.Rd index 2a1c2cf..a683e4f 100644 --- a/man/spd_upload_test.Rd +++ b/man/spd_upload_test.Rd @@ -4,8 +4,8 @@ \alias{spd_upload_test} \title{Perform an upload speed/bandwidth test} \usage{ -spd_upload_test(server, config = NULL, summarise = TRUE, timeout = 60, - .progress = "dplyr") +spd_upload_test(server, config = NULL, summarise = TRUE, + timeout = 60, .progress = "dplyr") } \arguments{ \item{server}{a data frame row from one of the functions that retrieves or diff --git a/man/speedtest.Rd b/man/speedtest.Rd index 34b7453..a4de2a5 100644 --- a/man/speedtest.Rd +++ b/man/speedtest.Rd @@ -6,12 +6,20 @@ \alias{speedtest-package} \title{Tools to Test and Compare Internet Bandwidth Speeds} \description{ -The 'Ookla' 'Speedtest' site \url{http://beta.speedtest.net/about} provides +The 'Ookla' 'Speedtest' site \url{https://beta.speedtest.net/about} provides interactive and programmatic services to test and compare bandwidth speeds from a source node on the Internet to thousands of test servers. Tools are provided to obtain test server lists, identify target servers for testing and performing speed/bandwidth tests. } +\seealso{ +Useful links: +\itemize{ + \item \url{https://gitlab.com/hrbrmstr/speedtest} + \item Report bugs at \url{https://gitlab.com/hrbrmstr/speedtest/issues} +} + +} \author{ Bob Rudis (bob@rud.is) } diff --git a/tests/test-all.R b/tests/test-all.R deleted file mode 100644 index 2826f0b..0000000 --- a/tests/test-all.R +++ /dev/null @@ -1,2 +0,0 @@ -library(testthat) -test_check("speedtest") diff --git a/tests/testthat/test-speedtest.R b/tests/testthat/test-speedtest.R deleted file mode 100644 index 56058d5..0000000 --- a/tests/testthat/test-speedtest.R +++ /dev/null @@ -1,12 +0,0 @@ -context("basic functionality") -test_that("we can do something", { - - #expect_that(some_function(), is_a("data.frame")) - -}) - -test_that("speeds are displayed in appropriate units", { - expect_match(nice_speed(0.1), "Kbit/s") - expect_match(nice_speed(1), "Mbit/s") - expect_match(nice_speed(1000), "Gbit/s") -}) \ No newline at end of file diff --git a/tests/tinytest.R b/tests/tinytest.R new file mode 100644 index 0000000..9b8b167 --- /dev/null +++ b/tests/tinytest.R @@ -0,0 +1,5 @@ + +if ( requireNamespace("tinytest", quietly=TRUE) ){ + tinytest::test_package("speedtest") +} +