# ========================================================================= # Copyright © 2019 T-Mobile USA, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ========================================================================= knitr::opts_chunk$set(echo = FALSE, dpi=300, error=TRUE, warning=TRUE, message=FALSE) library(loadtest)
URL: r attr(params$results,"config")$url
Method: r attr(results,"config")$method
if(!is.null(attr(results,"config")$headers)){ cat("__Headers:__\n\n") header_table <- data.frame(key = names(attr(results,"config")$headers), value = attr(results,"config")$headers, stringsAsFactors = FALSE) header_table$key <- paste0("`",header_table$key,"`") header_table$value <- paste0("`",header_table$value,"`") rownames(header_table) <- NULL print(knitr::kable(header_table)) }
if(!is.null(attr(results,"config")$body)){ cat("__Body:__\n\n") cat("```json\n") cat(jsonlite::toJSON(attr(results,"config")$body,auto_unbox=TRUE)) cat("\n```\n\n") }
r max(params$results$thread)
r nrow(params$results)/max(params$results$thread)
r nrow(params$results)
r sum(params$results$request_status == "Failure")
if(sum(params$results$request_status == "Failure") > 0){ cat("<div class=\"alert alert-danger\" role=\"alert\"> Warning: requests failed!</div>\n\n") }
r round((max(params$results$time_since_start) + results$elapsed[which.max(results$start_time)])/1000,3)
secondsr round(nrow(params$results)/(max(params$results$time_since_start) + results$elapsed[which.max(results$start_time)])*1000,3)
requests per secondr round(median(params$results$elapsed),3)
millisecondsloadtest::plot_elapsed_times(params$results) loadtest::plot_elapsed_times_histogram(params$results) loadtest::plot_requests_by_thread(params$results) loadtest::plot_requests_per_second(params$results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.