Minor graph fixes, see details below
- Fix to SCPFmastershipFailoverLat.R unreferenced variable
- Removed misleading comments
- Fix to maximum y-axis in various SCPF scripts
- Minor code refractoring
- Changed contact info to university email
Change-Id: I825f435827f824c094b61afc9abe2559e989cdf3
diff --git a/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R b/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
index f2697db..186c1c2 100644
--- a/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -51,9 +49,7 @@
flowObjFileModifier <- "fobj_"
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings
errBarOutputFile <- paste( args[ 9 ], "SCPFIntentInstallWithdrawRerouteLat", sep="" )
errBarOutputFile <- paste( errBarOutputFile, args[ 7 ], sep="_" )
if ( args[ 1 ] == "y" ){
@@ -153,20 +149,11 @@
theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
-# Calculate window to display graph, based on the lowest and highest points of the data.
-if ( min( dataFrame$ms - dataFrame$stds ) < 0){
- yWindowMin <- min( dataFrame$ms - dataFrame$stds ) * 1.05
-} else {
- yWindowMin <- 0
-}
-yWindowMax <- max( dataFrame$ms + dataFrame$stds )
-
mainPlot <- ggplot( data = dataFrame, aes( x = scale, y = ms, ymin = ms - stds, ymax = ms + stds,fill = type ) )
# Formatting the plot
width <- 1.3 # Width of the bars.
xScaleConfig <- scale_x_continuous( breaks=c( 1, 3, 5, 7, 9) )
-yLimit <- ylim( yWindowMin, yWindowMax )
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
@@ -180,7 +167,7 @@
theme <- theme( plot.title=element_text( hjust = 0.5, size = 22, face='bold' ) )
# Store plot configurations as 1 variable
-fundamentalGraphData <- mainPlot + xScaleConfig + yLimit + xLabel + yLabel + fillLabel + theme
+fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
# Create the bar graph with error bars.
diff --git a/TestON/JenkinsFile/scripts/SCPFLineGraph.R b/TestON/JenkinsFile/scripts/SCPFLineGraph.R
index 4b1ead6..376014d 100644
--- a/TestON/JenkinsFile/scripts/SCPFLineGraph.R
+++ b/TestON/JenkinsFile/scripts/SCPFLineGraph.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# This is the R script that generates the SCPF front page graphs.
@@ -31,7 +31,7 @@
# Import libraries to be used for graphing and organizing data, respectively.
# Find out more about ggplot2: https://github.com/tidyverse/ggplot2
# reshape2: https://github.com/hadley/reshape
-# RPostgreSQL: https://code.google.com/archive/p/rpostgresql/
+# RPostgreSQL: https://code.google.com/archive/p/rpostgresql/
print( "Importing libraries." )
library( ggplot2 )
library( reshape2 )
diff --git a/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R b/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
index 476cafb..3698afb 100644
--- a/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
+++ b/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -46,9 +44,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings.
errBarOutputFile <- paste( args[ 7 ], args[ 5 ], sep="" )
errBarOutputFile <- paste( errBarOutputFile, args[ 6 ], sep="_" )
errBarOutputFile <- paste( errBarOutputFile, "_PostGraph.jpg", sep="" )
@@ -101,7 +97,7 @@
mainPlot <- ggplot( data = dataFrame, aes( x = iterative, y = ms, fill = type ) )
xScaleConfig <- scale_x_continuous( breaks = dataFrame$iterative, label = dataFrame$date )
-xLabel <- xlab( "date" )
+xLabel <- xlab( "Build Date" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
diff --git a/TestON/JenkinsFile/scripts/SCPFcbench.R b/TestON/JenkinsFile/scripts/SCPFcbench.R
index 786a2fa..bccfb38 100644
--- a/TestON/JenkinsFile/scripts/SCPFcbench.R
+++ b/TestON/JenkinsFile/scripts/SCPFcbench.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -47,9 +45,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings.
errBarOutputFile <- paste( args[ 7 ], args[ 5 ], sep="" )
errBarOutputFile <- paste( errBarOutputFile, args[ 6 ], sep="_" )
errBarOutputFile <- paste( errBarOutputFile, "_errGraph.jpg", sep="" )
diff --git a/TestON/JenkinsFile/scripts/SCPFflowTp1g.R b/TestON/JenkinsFile/scripts/SCPFflowTp1g.R
index e11196a..89e2379 100644
--- a/TestON/JenkinsFile/scripts/SCPFflowTp1g.R
+++ b/TestON/JenkinsFile/scripts/SCPFflowTp1g.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -47,9 +45,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings.
errBarOutputFile <- paste( args[ 9 ], args[ 6 ], sep="" )
errBarOutputFile <- paste( errBarOutputFile, args[ 7 ], sep="_" )
if ( args[ 8 ] == 'y' ){
diff --git a/TestON/JenkinsFile/scripts/SCPFhostLat.R b/TestON/JenkinsFile/scripts/SCPFhostLat.R
index 75e2a45..e17cedb 100644
--- a/TestON/JenkinsFile/scripts/SCPFhostLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFhostLat.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -47,9 +45,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings
errBarOutputFile <- paste( args[ 7 ], args[ 5 ], sep="" )
errBarOutputFile <- paste( errBarOutputFile, args[ 6 ], sep="_" )
errBarOutputFile <- paste( errBarOutputFile, "_errGraph.jpg", sep="" )
diff --git a/TestON/JenkinsFile/scripts/SCPFintentEventTp.R b/TestON/JenkinsFile/scripts/SCPFintentEventTp.R
index a8d8248..7a55371 100644
--- a/TestON/JenkinsFile/scripts/SCPFintentEventTp.R
+++ b/TestON/JenkinsFile/scripts/SCPFintentEventTp.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -28,7 +28,6 @@
# Command line arguments are read. Args usually include the database filename and the output
# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -47,9 +46,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings.
errBarOutputFile <- paste( args[ 9 ], args[ 6 ], sep="" )
errBarOutputFile <- paste( errBarOutputFile, args[ 7 ], sep="_" )
if ( args[ 8 ] == 'y' ){
diff --git a/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R b/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
index 594a515..09ac5cb 100644
--- a/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -40,16 +38,13 @@
library( reshape2 )
library( RPostgreSQL ) # For databases
-# Normal usage
# Check if sufficient args are provided.
if ( is.na( args[ 7 ] ) ){
print( "Usage: Rscript SCPFmastershipFailoverLat <database-host> <database-port> <database-user-id> <database-password> <test-name> <branch-name> <directory-to-save-graphs>" )
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings.
errBarOutputFile <- paste( args[ 7 ], args[ 5 ], sep="" )
errBarOutputFile <- paste( errBarOutputFile, args[ 6 ], sep="_" )
errBarOutputFile <- paste( errBarOutputFile, "_errGraph.jpg", sep="" )
@@ -120,13 +115,12 @@
mainPlot <- ggplot( data = avgData, aes( x = scale, y = ms, ymin = ms - stdData$ms, ymax = ms + stdData$ms,fill = type ) )
xScaleConfig <- scale_x_continuous( breaks=c( 1, 3, 5, 7, 9) )
-yLimit <- ylim( yMin, yMax )
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
-fundamentalGraphData <- mainPlot + xScaleConfig + yLimit + xLabel + yLabel + fillLabel + theme
+fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
print( "Generating bar graph with error bars." )
diff --git a/TestON/JenkinsFile/scripts/SCPFportLat.R b/TestON/JenkinsFile/scripts/SCPFportLat.R
index 9eb38a5..e4b9d4f 100644
--- a/TestON/JenkinsFile/scripts/SCPFportLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFportLat.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -46,8 +44,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
+# paste() is used to concatenate strings.
errBarOutputFileUp <- paste( args[ 7 ], "SCPFportLat_", sep = "" )
errBarOutputFileUp <- paste( errBarOutputFileUp, args[ 6 ], sep = "" )
errBarOutputFileUp <- paste( errBarOutputFileUp, "_UpErrBarWithStack.jpg", sep = "" )
@@ -114,24 +111,16 @@
print( "Generating fundamental graph data (Port Up Latency)." )
width <- 1
- if ( min( fileData[ 'up_end_to_end_avg' ] - upAvgsData$stds ) < 0 ) {
- yMin <- min( fileData[ 'up_end_to_end_avg' ] - upAvgsData$stds ) * 1.05
- } else {
- yMin <- 0
- }
theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
-yMax <- max( fileData[ 'up_end_to_end_avg' ] + upAvgsData$stds )
-
mainPlot <- ggplot( data = upAvgsData, aes( x = scale, y = ms, fill = type, ymin = fileData[ 'up_end_to_end_avg' ] - stds, ymax = fileData[ 'up_end_to_end_avg' ] + stds ) )
xScaleConfig <- scale_x_continuous( breaks=c( 1, 3, 5, 7, 9) )
-yLimit <- ylim( yMin, yMax )
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
-fundamentalGraphData <- mainPlot + yLimit + xScaleConfig + xLabel + yLabel + fillLabel + theme
+fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
print( "Generating bar graph with error bars (Port Up Latency)." )
barGraphFormat <- geom_bar( stat="identity", width = width )
@@ -149,18 +138,11 @@
print( "Generating fundamental graph data (Port Down Latency)." )
- if ( min( fileData[ 'down_end_to_end_avg' ] - downAvgsData$stds ) < 0 ) {
- yMin <- min( fileData[ 'down_end_to_end_avg' ] - downAvgsData$stds )
- } else {
- yMin <- 0
- }
- yMax <- max( fileData[ 'down_end_to_end_avg' ] + downAvgsData$stds )
mainPlot <- ggplot( data = downAvgsData, aes( x = scale, y = ms, fill = type, ymin = fileData[ 'down_end_to_end_avg' ] - stds, ymax = fileData[ 'down_end_to_end_avg' ] + stds ) )
-yLimit <- ylim( yMin, yMax )
theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
-fundamentalGraphData <- mainPlot + yLimit + xScaleConfig + xLabel + yLabel + fillLabel + theme
+fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
print( "Generating bar graph with error bars (Port Down Latency)." )
barGraphFormat <- geom_bar( stat="identity", width = width )
diff --git a/TestON/JenkinsFile/scripts/SCPFscaleTopo.R b/TestON/JenkinsFile/scripts/SCPFscaleTopo.R
index cbc0291..de22c3a 100644
--- a/TestON/JenkinsFile/scripts/SCPFscaleTopo.R
+++ b/TestON/JenkinsFile/scripts/SCPFscaleTopo.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -46,9 +44,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings
outputFile <- paste( args[ 7 ], args[ 5 ], sep="" )
outputFile <- paste( outputFile, args[ 6 ], sep="_" )
outputFile <- paste( outputFile, "_graph.jpg", sep="" )
@@ -80,7 +76,7 @@
# Parse lists into data frames.
dataFrame <- melt( avgs ) # This is where reshape2 comes in. Avgs list is converted to data frame
-dataFrame$scale <- fileData$scale # Add node scaling to the data frame.
+dataFrame$scale <- fileData$scale # Add node scaling to the data frame.
colnames( dataFrame ) <- c( "ms", "type", "scale")
@@ -114,20 +110,12 @@
print( "Generating fundamental graph data." )
-# Calculate window to display graph, based on the lowest and highest points of the data.
-if ( min( avgsSum ) < 0){
- yWindowMin <- min( avgsSum ) * 1.05
-} else {
- yWindowMin <- 0
-}
-yWindowMax <- max( avgsSum ) * 1.2
-
theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
# Create the primary plot here.
# ggplot contains the following arguments:
# - data: the data frame that the graph will be based off of
-# - aes: the asthetics of the graph which require:
+# - aes: the asthetics of the graph which require:
# - x: x-axis values (usually node scaling)
# - y: y-axis values (usually time in milliseconds)
# - fill: the category of the colored side-by-side bars (usually type)
@@ -136,7 +124,6 @@
# Formatting the plot
width <- 0.6 # Width of the bars.
xScaleConfig <- scale_x_continuous( breaks = dataFrame$iterative, label = dataFrame$scale )
-yLimit <- ylim( yWindowMin, yWindowMax )
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
@@ -144,7 +131,7 @@
theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
# Store plot configurations as 1 variable
-fundamentalGraphData <- mainPlot + xScaleConfig + yLimit + xLabel + yLabel + fillLabel + theme
+fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
# Create the stacked bar graph with error bars.
# geom_bar contains:
diff --git a/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R b/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
index e5f54e5..bc90806 100644
--- a/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
+++ b/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,6 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -47,9 +44,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
-
+# paste() is used to concatenate strings.
outputFile <- paste( args[ 8 ], args[ 6 ], sep="" )
if ( args[ 1 ] == "y" ){
outputFile <- paste( outputFile, "flowObj", sep="_" )
@@ -80,7 +75,7 @@
fileData <- dbGetQuery( con, command )
if ( args[ 1 ] == "y" ){
- chartTitle <- "Number of Installed Intents & Flows with Flow Objectives"
+ chartTitle <- "Number of Installed Intents & Flows w/ FlowObj"
} else {
chartTitle <- "Number of Installed Intents & Flows"
}
diff --git a/TestON/JenkinsFile/scripts/SCPFswitchLat.R b/TestON/JenkinsFile/scripts/SCPFswitchLat.R
index 9131be9..0493859 100644
--- a/TestON/JenkinsFile/scripts/SCPFswitchLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFswitchLat.R
@@ -18,7 +18,7 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
# **********************************************************
# STEP 1: File management.
@@ -26,9 +26,7 @@
print( "STEP 1: File management." )
-# Command line arguments are read. Args usually include the database filename and the output
-# directory for the graphs to save to.
-# ie: Rscript SCPFgraphGenerator SCPFsampleDataDB.csv ~/tmp/
+# Command line arguments are read.
print( "Reading commmand-line args." )
args <- commandArgs( trailingOnly=TRUE )
@@ -46,8 +44,7 @@
q() # basically exit(), but in R
}
-# Filenames for output graphs include the testname and the graph type.
-# See the examples below. paste() is used to concatenate strings.
+# paste() is used to concatenate strings.
errBarOutputFileUp <- paste( args[ 7 ], "SCPFswitchLat_", sep = "" )
errBarOutputFileUp <- paste( errBarOutputFileUp, args[ 6 ], sep = "" )
errBarOutputFileUp <- paste( errBarOutputFileUp, "_UpErrBarWithStack.jpg", sep = "" )
@@ -109,24 +106,17 @@
print( "Generating fundamental graph data (Switch Up Latency)." )
width <- 1
- if ( min( fileData[ 'up_end_to_end_avg' ] - upAvgsData$stds ) < 0 ) {
- yMin <- min( fileData[ 'up_end_to_end_avg' ] + upAvgsData$stds ) * 1.05
- } else {
- yMin <- 0
- }
-yMax <- max( fileData[ 'up_end_to_end_avg' ] + upAvgsData$stds )
theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
mainPlot <- ggplot( data = upAvgsData, aes( x = scale, y = ms, fill = type, ymin = fileData[ 'up_end_to_end_avg' ] - stds, ymax = fileData[ 'up_end_to_end_avg' ] + stds ) )
xScaleConfig <- scale_x_continuous( breaks=c( 1, 3, 5, 7, 9) )
-yLimit <- ylim( yMin, yMax )
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
-fundamentalGraphData <- mainPlot + yLimit + xScaleConfig + xLabel + yLabel + fillLabel + theme
+fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
print( "Generating bar graph with error bars (Switch Up Latency)." )
barGraphFormat <- geom_bar( stat="identity", width = width )
@@ -144,18 +134,11 @@
print( "Generating fundamental graph data (Switch Down Latency)." )
- if ( min( fileData[ 'down_end_to_end_avg' ] - downAvgsData$stds ) < 0 ) {
- yMin <- min( fileData[ 'down_end_to_end_avg' ] - downAvgsData$stds )
- } else {
- yMin <- 0
- }
- yMax <- max( fileData[ 'down_end_to_end_avg' ] + downAvgsData$stds )
mainPlot <- ggplot( data = downAvgsData, aes( x = scale, y = ms, fill = type, ymin = fileData[ 'down_end_to_end_avg' ] - stds, ymax = fileData[ 'down_end_to_end_avg' ] + stds ) )
-yLimit <- ylim( yMin, yMax )
theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
-fundamentalGraphData <- mainPlot + yLimit + xScaleConfig + xLabel + yLabel + fillLabel + theme
+fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
print( "Generating bar graph with error bars (Switch Down Latency)." )
barGraphFormat <- geom_bar( stat="identity", width = width )
diff --git a/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R b/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
index bb7b4b4..395823d 100644
--- a/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
+++ b/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
@@ -18,9 +18,9 @@
# along with TestON. If not, see <http://www.gnu.org/licenses/>.
#
# If you have any questions, or if you don't understand R,
-# please contact Jeremy Ronquillo: jeremyr@opennetworking.org
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
-# This is the R script that generates the FUNC and HA result graphs.
+# This is the R script that generates the FUNC, HA, and various USECASE result graphs.
# **********************************************************
# STEP 1: Data management.