Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 1 | # Copyright 2017 Open Networking Foundation (ONF) |
| 2 | # |
| 3 | # Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>, |
| 4 | # the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>, |
| 5 | # or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg> |
| 6 | # |
| 7 | # TestON is free software: you can redistribute it and/or modify |
| 8 | # it under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation, either version 2 of the License, or |
| 10 | # (at your option) any later version. |
| 11 | # |
| 12 | # TestON is distributed in the hope that it will be useful, |
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | # GNU General Public License for more details. |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public License |
| 18 | # along with TestON. If not, see <http://www.gnu.org/licenses/>. |
| 19 | # |
| 20 | # If you have any questions, or if you don't understand R, |
Jeremy Ronquillo | b626884 | 2017-10-03 13:02:58 -0700 | [diff] [blame] | 21 | # please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 22 | |
| 23 | # ********************************************************** |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 24 | # STEP 1: Data management. |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 25 | # ********************************************************** |
| 26 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 27 | print( "**********************************************************" ) |
| 28 | print( "STEP 1: Data management." ) |
| 29 | print( "**********************************************************" ) |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 30 | database_host = 1 |
| 31 | database_port = 2 |
| 32 | database_u_id = 3 |
| 33 | database_pw = 4 |
| 34 | test_name = 5 |
| 35 | branch_name = 6 |
| 36 | save_directory = 7 |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 37 | |
Jeremy Ronquillo | b626884 | 2017-10-03 13:02:58 -0700 | [diff] [blame] | 38 | # Command line arguments are read. |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 39 | print( "Reading commmand-line args." ) |
| 40 | args <- commandArgs( trailingOnly=TRUE ) |
| 41 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 42 | # ---------------- |
| 43 | # Import Libraries |
| 44 | # ---------------- |
| 45 | |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 46 | print( "Importing libraries." ) |
| 47 | library( ggplot2 ) |
| 48 | library( reshape2 ) |
| 49 | library( RPostgreSQL ) # For databases |
| 50 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 51 | # ------------------- |
| 52 | # Check CLI Arguments |
| 53 | # ------------------- |
| 54 | |
| 55 | print( "Verifying CLI args." ) |
| 56 | |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 57 | if ( is.na( args[ save_directory ] ) ){ |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 58 | |
| 59 | print( paste( "Usage: Rscript SCPFswitchLat", |
| 60 | "<database-host>", |
| 61 | "<database-port>", |
| 62 | "<database-user-id>", |
| 63 | "<database-password>", |
| 64 | "<test-name>", |
| 65 | "<branch-name>", |
| 66 | "<directory-to-save-graphs>", |
| 67 | sep=" ") ) |
| 68 | |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 69 | q() # basically exit(), but in R |
| 70 | } |
| 71 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 72 | # ----------------- |
| 73 | # Create File Names |
| 74 | # ----------------- |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 75 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 76 | print( "Creating filenames and title of graph." ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 77 | |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 78 | errBarOutputFileUp <- paste( args[ save_directory ], |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 79 | "SCPFswitchLat_", |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 80 | args[ branch_name ], |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 81 | "_UpErrBarWithStack.jpg", |
| 82 | sep="" ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 83 | |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 84 | errBarOutputFileDown <- paste( args[ save_directory ], |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 85 | "SCPFswitchLat_", |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 86 | args[ branch_name ], |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 87 | "_DownErrBarWithStack.jpg", |
| 88 | sep="" ) |
| 89 | # ------------------ |
| 90 | # SQL Initialization |
| 91 | # ------------------ |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 92 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 93 | print( "Initializing SQL" ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 94 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 95 | con <- dbConnect( dbDriver( "PostgreSQL" ), |
| 96 | dbname = "onostest", |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 97 | host = args[ database_host ], |
| 98 | port = strtoi( args[ database_port ] ), |
| 99 | user = args[ database_u_id ], |
| 100 | password = args[ database_pw ] ) |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 101 | |
| 102 | # -------------------------- |
| 103 | # Switch Latency SQL Command |
| 104 | # -------------------------- |
| 105 | |
| 106 | print( "Generating Switch Latency SQL Command" ) |
| 107 | |
| 108 | command <- paste( "SELECT * FROM switch_latency_details WHERE branch = '", |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 109 | args[ branch_name ], |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 110 | "' AND date IN ( SELECT MAX( date ) FROM switch_latency_details WHERE branch='", |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 111 | args[ branch_name ], |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 112 | "' )", |
| 113 | sep="" ) |
| 114 | |
| 115 | print( "Sending SQL command:" ) |
| 116 | print( command ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 117 | |
| 118 | fileData <- dbGetQuery( con, command ) |
| 119 | |
| 120 | # ********************************************************** |
| 121 | # STEP 2: Organize data. |
| 122 | # ********************************************************** |
| 123 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 124 | print( "**********************************************************" ) |
| 125 | print( "STEP 2: Organize Data." ) |
| 126 | print( "**********************************************************" ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 127 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 128 | # ------------------------------- |
| 129 | # Switch Up Averages Data Sorting |
| 130 | # ------------------------------- |
| 131 | |
| 132 | print( "Sorting data for Switch Up Averages." ) |
| 133 | |
| 134 | upAvgs <- c( fileData[ 'up_device_to_graph_avg' ], |
| 135 | fileData[ 'role_reply_to_device_avg' ], |
| 136 | fileData[ 'role_request_to_role_reply_avg' ], |
| 137 | fileData[ 'feature_reply_to_role_request_avg' ], |
| 138 | fileData[ 'tcp_to_feature_reply_avg' ] ) |
| 139 | |
| 140 | # ------------------------------ |
| 141 | # Switch Up Construct Data Frame |
| 142 | # ------------------------------ |
| 143 | |
| 144 | print( "Constructing Switch Up data frame." ) |
| 145 | |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 146 | upAvgsData <- melt( upAvgs ) |
| 147 | upAvgsData$scale <- fileData$scale |
| 148 | upAvgsData$up_std <- fileData$up_std |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 149 | upAvgsData <- na.omit( upAvgsData ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 150 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 151 | colnames( upAvgsData ) <- c( "ms", |
| 152 | "type", |
| 153 | "scale", |
| 154 | "stds" ) |
| 155 | |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 156 | upAvgsData$type <- as.character( upAvgsData$type ) |
| 157 | upAvgsData$type <- factor( upAvgsData$type, levels=unique( upAvgsData$type ) ) |
| 158 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 159 | sumOfUpAvgs <- fileData[ 'up_device_to_graph_avg' ] + |
| 160 | fileData[ 'role_reply_to_device_avg' ] + |
| 161 | fileData[ 'role_request_to_role_reply_avg' ] + |
| 162 | fileData[ 'feature_reply_to_role_request_avg' ] + |
| 163 | fileData[ 'tcp_to_feature_reply_avg' ] |
| 164 | |
| 165 | print( "Up Averages Results:" ) |
| 166 | print( upAvgsData ) |
| 167 | |
| 168 | # --------------------------------- |
| 169 | # Switch Down Averages Data Sorting |
| 170 | # --------------------------------- |
| 171 | |
| 172 | print( "Sorting data for Switch Down Averages." ) |
| 173 | |
| 174 | downAvgs <- c( fileData[ 'down_device_to_graph_avg' ], |
| 175 | fileData[ 'ack_to_device_avg' ], |
| 176 | fileData[ 'fin_ack_to_ack_avg' ] ) |
| 177 | |
| 178 | # -------------------------------- |
| 179 | # Switch Down Construct Data Frame |
| 180 | # -------------------------------- |
| 181 | |
| 182 | print( "Constructing Switch Down data frame." ) |
| 183 | |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 184 | downAvgsData <- melt( downAvgs ) |
| 185 | downAvgsData$scale <- fileData$scale |
| 186 | downAvgsData$down_std <- fileData$down_std |
| 187 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 188 | colnames( downAvgsData ) <- c( "ms", |
| 189 | "type", |
| 190 | "scale", |
| 191 | "stds" ) |
| 192 | |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 193 | downAvgsData$type <- as.character( downAvgsData$type ) |
| 194 | downAvgsData$type <- factor( downAvgsData$type, levels=unique( downAvgsData$type ) ) |
| 195 | |
Jeremy Ronquillo | 2d2649d | 2017-09-14 12:53:06 -0700 | [diff] [blame] | 196 | downAvgsData <- na.omit( downAvgsData ) |
| 197 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 198 | sumOfDownAvgs <- fileData[ 'down_device_to_graph_avg' ] + |
| 199 | fileData[ 'ack_to_device_avg' ] + |
| 200 | fileData[ 'fin_ack_to_ack_avg' ] |
Jeremy Ronquillo | 2d2649d | 2017-09-14 12:53:06 -0700 | [diff] [blame] | 201 | |
| 202 | print( "Down Averages Results:" ) |
| 203 | print( downAvgsData ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 204 | |
| 205 | # ********************************************************** |
| 206 | # STEP 3: Generate graphs. |
| 207 | # ********************************************************** |
| 208 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 209 | print( "**********************************************************" ) |
| 210 | print( "STEP 3: Generate Graph." ) |
| 211 | print( "**********************************************************" ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 212 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 213 | # ------------------------------------ |
| 214 | # Initialize Variables For Both Graphs |
| 215 | # ------------------------------------ |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 216 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 217 | print( "Initializing variables used in both graphs." ) |
Jeremy Ronquillo | 2d2649d | 2017-09-14 12:53:06 -0700 | [diff] [blame] | 218 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 219 | theme_set( theme_grey( base_size = 22 ) ) # set the default text size of the graphs |
| 220 | xScaleConfig <- scale_x_continuous( breaks = c( 1, 3, 5, 7, 9 ) ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 221 | xLabel <- xlab( "Scale" ) |
| 222 | yLabel <- ylab( "Latency (ms)" ) |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 223 | imageWidth <- 15 |
| 224 | imageHeight <- 10 |
| 225 | imageDPI <- 200 |
| 226 | errorBarColor <- rgb( 140, 140, 140, maxColorValue = 255 ) |
| 227 | barWidth <- 1 |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 228 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 229 | theme <- theme( plot.title = element_text( hjust = 0.5, size = 32, face = 'bold' ), |
| 230 | legend.position = "bottom", |
| 231 | legend.text = element_text( size = 22 ), |
| 232 | legend.title = element_blank(), |
| 233 | legend.key.size = unit( 1.5, 'lines' ) ) |
| 234 | |
| 235 | # ---------------------------- |
| 236 | # Switch Up Generate Main Plot |
| 237 | # ---------------------------- |
| 238 | |
| 239 | print( "Creating main plot (Switch Up Latency)." ) |
| 240 | |
| 241 | mainPlot <- ggplot( data = upAvgsData, aes( x = scale, |
| 242 | y = ms, |
| 243 | fill = type, |
| 244 | ymin = fileData[ 'up_end_to_end_avg' ], |
| 245 | ymax = fileData[ 'up_end_to_end_avg' ] + stds ) ) |
| 246 | |
| 247 | # ---------------------------------------- |
| 248 | # Switch Up Fundamental Variables Assigned |
| 249 | # ---------------------------------------- |
| 250 | |
| 251 | print( "Generating fundamental graph data (Switch Up Latency)." ) |
| 252 | |
| 253 | title <- ggtitle( "Switch Up Latency" ) |
| 254 | |
| 255 | fundamentalGraphData <- mainPlot + |
| 256 | xScaleConfig + |
| 257 | xLabel + |
| 258 | yLabel + |
| 259 | theme + |
| 260 | title |
| 261 | |
| 262 | # ------------------------------------- |
| 263 | # Switch Up Generating Bar Graph Format |
| 264 | # ------------------------------------- |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 265 | |
| 266 | print( "Generating bar graph with error bars (Switch Up Latency)." ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 267 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 268 | barGraphFormat <- geom_bar( stat = "identity", width = barWidth ) |
| 269 | errorBarFormat <- geom_errorbar( width = barWidth, color = errorBarColor ) |
| 270 | |
| 271 | barGraphValues <- geom_text( aes( x = upAvgsData$scale, |
| 272 | y = sumOfUpAvgs + 0.04 * max( sumOfUpAvgs ), |
| 273 | label = format( sumOfUpAvgs, |
| 274 | digits = 3, |
| 275 | big.mark = ",", |
| 276 | scientific = FALSE ) ), |
| 277 | size = 7.0, |
| 278 | fontface = "bold" ) |
| 279 | |
| 280 | wrapLegend <- guides( fill = guide_legend( nrow = 2, byrow = TRUE ) ) |
| 281 | |
| 282 | result <- fundamentalGraphData + |
| 283 | barGraphFormat + |
| 284 | errorBarFormat + |
| 285 | barGraphValues + |
| 286 | wrapLegend |
| 287 | |
| 288 | # --------------------------------- |
| 289 | # Switch Up Exporting Graph to File |
| 290 | # --------------------------------- |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 291 | |
| 292 | print( paste( "Saving bar chart with error bars (Switch Up Latency) to", errBarOutputFileUp ) ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 293 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 294 | ggsave( errBarOutputFileUp, |
| 295 | width = imageWidth, |
| 296 | height = imageHeight, |
| 297 | dpi = imageDPI ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 298 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 299 | print( paste( "[SUCCESS] Successfully wrote bar chart with error bars (Switch Up Latency) out to", errBarOutputFileUp ) ) |
| 300 | |
| 301 | # ------------------------------ |
| 302 | # Switch Down Generate Main Plot |
| 303 | # ------------------------------ |
| 304 | |
| 305 | print( "Creating main plot (Switch Down Latency)." ) |
| 306 | |
| 307 | mainPlot <- ggplot( data = downAvgsData, aes( x = scale, |
| 308 | y = ms, |
| 309 | fill = type, |
| 310 | ymin = fileData[ 'down_end_to_end_avg' ], |
| 311 | ymax = fileData[ 'down_end_to_end_avg' ] + stds ) ) |
| 312 | |
| 313 | # ------------------------------------------ |
| 314 | # Switch Down Fundamental Variables Assigned |
| 315 | # ------------------------------------------ |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 316 | |
| 317 | print( "Generating fundamental graph data (Switch Down Latency)." ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 318 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 319 | colors <- scale_fill_manual( values=c( "#F77670", # Red |
| 320 | "#619DFA", # Blue |
| 321 | "#18BA48" ) ) # Green |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 322 | |
| 323 | title <- ggtitle( "Switch Down Latency" ) |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 324 | |
| 325 | fundamentalGraphData <- mainPlot + |
| 326 | xScaleConfig + |
| 327 | xLabel + |
| 328 | yLabel + |
| 329 | theme + |
| 330 | title |
| 331 | |
| 332 | # --------------------------------------- |
| 333 | # Switch Down Generating Bar Graph Format |
| 334 | # --------------------------------------- |
| 335 | |
| 336 | print( "Generating bar graph with error bars (Switch Down Latency)." ) |
| 337 | barGraphFormat <- geom_bar( stat = "identity", width = barWidth ) |
| 338 | errorBarFormat <- geom_errorbar( width = barWidth, color = errorBarColor ) |
| 339 | |
| 340 | barGraphValues <- geom_text( aes( x = downAvgsData$scale, |
| 341 | y = sumOfDownAvgs + 0.04 * max( sumOfDownAvgs ), |
| 342 | label = format( sumOfDownAvgs, |
| 343 | digits = 3, |
| 344 | big.mark = ",", |
| 345 | scientific = FALSE ) ), |
| 346 | size = 7.0, |
| 347 | fontface = "bold" ) |
| 348 | |
| 349 | wrapLegend <- guides( fill = guide_legend( nrow = 1, byrow = TRUE ) ) |
| 350 | |
| 351 | result <- fundamentalGraphData + |
| 352 | barGraphFormat + |
| 353 | colors + |
| 354 | errorBarFormat + |
| 355 | barGraphValues + |
| 356 | wrapLegend |
| 357 | |
| 358 | # ----------------------------------- |
| 359 | # Switch Down Exporting Graph to File |
| 360 | # ----------------------------------- |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 361 | |
| 362 | print( paste( "Saving bar chart with error bars (Switch Down Latency) to", errBarOutputFileDown ) ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 363 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 364 | ggsave( errBarOutputFileDown, |
| 365 | width = imageWidth, |
| 366 | height = imageHeight, |
| 367 | dpi = imageDPI ) |
Jeremy Ronquillo | 6df8781 | 2017-08-28 16:17:36 +0000 | [diff] [blame] | 368 | |
Jeremy Ronquillo | 7673f80 | 2017-10-30 09:42:44 -0700 | [diff] [blame] | 369 | print( paste( "[SUCCESS] Successfully wrote bar chart with error bars (Switch Down Latency) out to", errBarOutputFileDown ) ) |