Merge "Add functions to check the size of raft logs"
diff --git a/TestON/JenkinsFile/FUNCJenkinsFile b/TestON/JenkinsFile/FUNCJenkinsFile
index 51c613e..e7b1d3b 100644
--- a/TestON/JenkinsFile/FUNCJenkinsFile
+++ b/TestON/JenkinsFile/FUNCJenkinsFile
@@ -18,7 +18,7 @@
]
table_name = "executed_test_tests"
result_name = "executed_test_results"
-graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/testCaseGraphGenerator.R"
+graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
graph_saved_directory = "/var/jenkins/workspace/Pipeline_postjob_VM/"
echo("Testcases:")
def testsToRun = null
@@ -56,6 +56,7 @@
'WORKSPACE='+workSpace]){
sh '''#!/bin/bash -l
set -i # interactive
+ set +e
shopt -s expand_aliases # expand alias in non-interactive mode
export PYTHONUNBUFFERED=1
@@ -83,7 +84,7 @@
// For the Wiki page
sh '''#!/bin/bash -i
-
+ set +e
echo "ONOS Branch is: ${ONOSBranch}"
echo "TestON Branch is: ${TestONBranch}"
@@ -118,7 +119,6 @@
def database_command = pass + "|psql --host=" + host + " --port=" + port + " --username=" + user + " --password --dbname onostest -c \"INSERT INTO " + table_name + " VALUES('\$DATE','" + result_name + "','" + testName + "',\$BUILD_NUMBER, '\$ONOSBranch', \$line);\""
sh '''#!/bin/bash
- set +e
export DATE=\$(date +%F_%T)
cd ~
pwd
@@ -134,7 +134,7 @@
}
// Fetch Logs
sh '''#!/bin/bash
-
+ set +e
cd ~/OnosSystemTest/TestON/logs
echo "Job Name is: " + ''' + testName + '''
TestONlogDir=$(ls -t | grep ${TEST_NAME}_ |head -1)
diff --git a/TestON/JenkinsFile/HAJenkinsFile b/TestON/JenkinsFile/HAJenkinsFile
index 1a30377..d123075 100644
--- a/TestON/JenkinsFile/HAJenkinsFile
+++ b/TestON/JenkinsFile/HAJenkinsFile
@@ -18,7 +18,7 @@
table_name = "executed_test_tests"
result_name = "executed_test_results"
-graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/testCaseGraphGenerator.R"
+graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
graph_saved_directory = "/var/jenkins/workspace/Pipeline_postjob_VM/"
echo("Testcases:")
@@ -121,7 +121,6 @@
def database_command = pass + "|psql --host=" + host + " --port=" + port + " --username=" + user + " --password --dbname onostest -c \"INSERT INTO " + table_name + " VALUES('\$DATE','" + result_name + "','" + testName + "',\$BUILD_NUMBER, '\$ONOSBranch', \$line);\""
sh '''#!/bin/bash
- set +e
export DATE=\$(date +%F_%T)
cd ~
pwd
diff --git a/TestON/JenkinsFile/JenkinsfileTrigger b/TestON/JenkinsFile/JenkinsfileTrigger
index 70b82b4..c20db0c 100644
--- a/TestON/JenkinsFile/JenkinsfileTrigger
+++ b/TestON/JenkinsFile/JenkinsfileTrigger
@@ -30,7 +30,8 @@
"VP" : "USECASE"
]
-onos_branch = "1.11"
+onos_branch = "master"
+onos_tag = params.ONOSTag
// Set tests based on day of week
def now = new Date()
echo(now.toString())
@@ -85,7 +86,7 @@
USECASE_choices = USECASE_Basic + "," + USECASE_NEW_TEST
FUNC_choices += "," + FUNC_ExtraSetA + "," + FUNC_ExtraSetB
HA_choices += "," + HA_ExtraSetA + "," + HA_ExtraSetB
- onos_branch= "master"
+ onos_branch= "1.11"
day = "Sunday"
break
}
@@ -113,7 +114,7 @@
for( String test in testcases.keySet() ){
println test
if (testcases[test]["tests"] != ""){
- runTest[testcases[test]["nodeName"]][test] = trigger_pipeline( onos_branch, testcases[test]["tests"], testcases[test]["nodeName"], test, manually_run )
+ runTest[testcases[test]["nodeName"]][test] = trigger_pipeline( onos_branch, testcases[test]["tests"], testcases[test]["nodeName"], test, manually_run, onos_tag )
}
}
def finalList = [:]
@@ -142,7 +143,7 @@
for( String test in testList )
testcases [ Prefix_organizer[ ( test == "FUNCbgpls" || test == "FUNCvirNetNB" ? "US" : ( test[ 0 ] + test[ 1 ] ) ) ] ][ "tests" ] += test + ","
}
-def trigger_pipeline( branch, tests, nodeName, jobOn, manuallyRun ){
+def trigger_pipeline( branch, tests, nodeName, jobOn, manuallyRun, onosTag ){
// nodeName : "BM" or "VM"
// jobOn : "SCPF" or "USECASE" or "FUNC" or "HA"
return{
@@ -159,9 +160,9 @@
println jobOn + "_Pipeline_" + manuallyRun ? "manually" : branch
node("TestStation-" + nodeName + "s"){
if (!manuallyRun)
- envSetup(onos_branch, test_branch)
+ envSetup(onos_branch, test_branch, onosTag)
- exportEnvProperty( onos_branch, test_branch, wiki, tests, post_result, manuallyRun )
+ exportEnvProperty( onos_branch, test_branch, wiki, tests, post_result, manuallyRun, onosTag )
}
jobToRun = jobOn + "_Pipeline_" + ( manuallyRun ? "manually" : branch )
@@ -170,12 +171,12 @@
}
// export Environment properties.
-def exportEnvProperty( onos_branch, test_branch, wiki, tests, postResult, manually_run ){
+def exportEnvProperty( onos_branch, test_branch, wiki, tests, postResult, manually_run, onosTag ){
stage("export Property"){
sh '''
echo "ONOSBranch=''' + onos_branch +'''" > /var/jenkins/TestONOS.property
echo "TestONBranch=''' + test_branch +'''" >> /var/jenkins/TestONOS.property
- echo "ONOSTag='''+ env.ONOSTag +'''" >> /var/jenkins/TestONOS.property
+ echo "ONOSTag='''+ onosTag +'''" >> /var/jenkins/TestONOS.property
echo "WikiPrefix=''' + wiki +'''" >> /var/jenkins/TestONOS.property
echo "ONOSJVMHeap='''+ env.ONOSJVMHeap +'''" >> /var/jenkins/TestONOS.property
echo "Tests=''' + tests +'''" >> /var/jenkins/TestONOS.property
@@ -185,32 +186,31 @@
}
}
// Initialize the environment Setup for the onos and OnosSystemTest
-def envSetup( onos_branch, test_branch ){
+def envSetup( onos_branch, test_branch, onos_tag ){
stage("envSetup") {
- sh '''
- #!/bin/bash
+ sh '''#!/bin/bash -l
set +e
. ~/.bashrc
env
echo -e "\n##### Set TestON Branch #####"
- echo "TestON Branch is set on: " + test_branch
+ echo "TestON Branch is set on: ''' + test_branch + '''"
cd ~/OnosSystemTest/
git checkout HEAD~1 # Make sure you aren't pn a branch
git branch | grep -v "detached from" | xargs git branch -d # delete all local branches merged with remote
- git branch -D $TestONBranch # just incase there are local changes. This will normally result in a branch not found error
+ git branch -D ''' + test_branch + ''' # just incase there are local changes. This will normally result in a branch not found error
git clean -df # clean any local files
git fetch --all # update all caches from remotes
- git reset --hard origin/$TestONBranch # force local index to match remote branch
+ git reset --hard origin/''' + test_branch +''' # force local index to match remote branch
git clean -df # clean any local files
- git checkout $TestONBranch #create new local branch
+ git checkout ''' + test_branch + ''' #create new local branch
git branch
git log -1 --decorate
echo -e "\n##### Set ONOS Branch #####"
- echo "ONOS Branch is set on: + onos_branch
+ echo "ONOS Branch is set on: ''' + onos_branch + '''"
echo -e "\n #### check karaf version ######"
env |grep karaf
@@ -220,17 +220,12 @@
~/onos/tools/build/onos-buck clean
git checkout HEAD~1 # Make sure you aren't pn a branch
git branch | grep -v "detached from" | xargs git branch -d # delete all local branches merged with remote
- git branch -D $ONOSBranch # just incase there are local changes. This will normally result in a branch not found error
+ git branch -D ''' + onos_branch + ''' # just incase there are local changes. This will normally result in a branch not found error
git clean -df # clean any local files
git fetch --all # update all caches from remotes
- git reset --hard origin/$ONOSBranch # force local index to match remote branch
+ git reset --hard origin/''' + onos_branch + ''' # force local index to match remote branch
git clean -df # clean any local files
- if [ -z "$ONOSTag" ] #if tag is not specified
- then
- git checkout $ONOSBranch #create new local branch
- else
- git checkout $ONOSTag #checkout the tag
- fi
+ ''' + tagCheck(onos_tag, onos_branch) + '''
git branch
git log -1 --decorate
@@ -238,8 +233,8 @@
echo -e "\n##### set jvm heap size to 8G #####"
echo ${ONOSJVMHeap}
- inserted_line="export JAVA_OPTS="${ONOSJVMHeap}""
- sed -i "s/bash/bash\n$inserted_line/" ~/onos/tools/package/bin/onos-service
+ inserted_line="export JAVA_OPTS=\"\${ONOSJVMHeap}\""
+ sed -i "s/bash/bash\\n$inserted_line/" ~/onos/tools/package/bin/onos-service
echo "##### Check onos-service setting..... #####"
cat ~/onos/tools/package/bin/onos-service
@@ -252,6 +247,19 @@
rm -f ~/onos/bin/buck
~/onos/tools/build/onos-buck build onos
+ sleep 30
+ echo -e "\n##### Stop all running instances of Karaf #####"
+ kill $(ps -efw | grep karaf | grep -v grep | awk '{print $2}')
+ sleep 30
+
git branch'''
}
+}
+def tagCheck(onos_tag, onos_branch){
+ result = "git checkout "
+ if (onos_tag == "" )
+ result += onos_branch //create new local branch
+ else
+ result += onos_tag //checkout the tag
+ return result
}
\ No newline at end of file
diff --git a/TestON/JenkinsFile/SCPFJenkinsFile b/TestON/JenkinsFile/SCPFJenkinsFile
index 22ad46f..2661cca 100644
--- a/TestON/JenkinsFile/SCPFJenkinsFile
+++ b/TestON/JenkinsFile/SCPFJenkinsFile
@@ -11,24 +11,24 @@
SCPFcbench: [ test:'SCPFcbench', table:'cbench_bm_tests', results:'cbench_bm_results', file:'CbenchDB', rFile:'SCPFcbench.R', extra:none, finalResult:1, graphTitle:['Cbench Test'], dbCols:'avg', dbWhere:'', y_axis:'Throughput (Responses/sec)'],
SCPFhostLat: [ test:'SCPFhostLat', table:'host_latency_tests', results:'host_latency_results', file:'HostAddLatency', rFile:'SCPFhostLat.R', extra:none,finalResult:1, graphTitle:['Host Latency Test'], dbCols:'avg', dbWhere:'AND scale=5', y_axis:'Latency (ms)'],
SCPFportLat: [ test:'SCPFportLat', table:'port_latency_details', results:'port_latency_results', file:'/tmp/portEventResultDb', rFile:'SCPFportLat.R', extra:none, finalResult:1, graphTitle:['Port Latency Test - Port Up','Port Latency Test - Port Down'], dbCols:[ 'up_ofp_to_dev_avg,up_dev_to_link_avg,up_link_to_graph_avg', 'down_ofp_to_dev_avg,down_dev_to_link_avg,down_link_to_graph_avg' ], dbWhere:'AND scale=5', y_axis:'Latency (ms)' ],
- SCPFflowTp1g: [ test:'SCPFflowTp1g --params TEST/flows:12250', table:'flow_tp_tests', results:'flow_tp_results', file:'flowTP1gDB', rFile:'SCPFflowTp1g.R n', extra:neighbors,finalResult:1, graphTitle:['Flow Througphput Test - neighbors=0','Flow Througphput Test - neighbors=4'], dbCols:'avg', dbWhere:[ 'AND scale=5 AND neighbors=0 ','AND scale=5 AND NOT neighbors=0' ], y_axis:'Throughput (,000 Flows/sec)' ],
- SCPFflowTp1gWithFlowObj: [ test:'SCPFflowTp1g --params TEST/flowObj:True', table:'flow_tp_fobj_tests', results:'flow_tp_fobj_results', file:'flowTP1gDBFlowObj', rFile:'SCPFflowTp1g.R y', extra:neighbors, finalResult:0],
+ SCPFflowTp1g: [ test:'SCPFflowTp1g --params TEST/flows=12250', table:'flow_tp_tests', results:'flow_tp_results', file:'flowTP1gDB', rFile:'SCPFflowTp1g.R n', extra:neighbors,finalResult:1, graphTitle:['Flow Throughput Test - neighbors=0','Flow Throughput Test - neighbors=4'], dbCols:'avg', dbWhere:[ 'AND scale=5 AND neighbors=0 ','AND scale=5 AND NOT neighbors=0' ], y_axis:'Throughput (,000 Flows/sec)' ],
+ SCPFflowTp1gWithFlowObj: [ test:'SCPFflowTp1g --params TEST/flowObj=True', table:'flow_tp_fobj_tests', results:'flow_tp_fobj_results', file:'flowTP1gDBFlowObj', rFile:'SCPFflowTp1g.R y', extra:neighbors, finalResult:0],
SCPFscaleTopo: [ test:'SCPFscaleTopo', table:'scale_topo_latency_details', results:'scale_topo_latency_results', file:'/tmp/scaleTopoResultDb', rFile:'SCPFscaleTopo.R', extra:none, finalResult:1, graphTitle:['Scale Topology Test'], dbCols:[ 'first_connection_to_last_connection, last_connection_to_last_role_request, last_role_request_to_last_topology' ], dbWhere:'AND scale=20' , y_axis:'Latency (s)'],
SCPFswitchLat: [ test:'SCPFswitchLat', table:'switch_latency_details', results:'switch_latency_results', file:'/tmp/switchEventResultDb', rFile:'SCPFswitchLat.R', extra:none, finalResult:1, graphTitle:['Switch Latency Test - Switch Up','Switch Latency Test - Switch Down'], dbCols:[ 'tcp_to_feature_reply_avg,feature_reply_to_role_request_avg,role_request_to_role_reply_avg,role_reply_to_device_avg,up_device_to_graph_avg', 'fin_ack_to_ack_avg,ack_to_device_avg,down_device_to_graph_avg' ], dbWhere:'AND scale=5', y_axis:'Latency (ms)' ],
- SCPFbatchFlowResp: [ test:'SCPFbatchFlowResp', table:'batch_flow_tests', results:'batch_flow_results', file:'SCPFbatchFlowRespData', rFile:'SCPFbatchFlowResp.R', extra:none, finalResult:1, graphTitle:['Batch Flow Test - Elapsepost', 'Batch Flow Test - Elapsedel'], dbCols:[ 'elapsepost, posttoconfrm', 'elapsedel, deltoconfrm' ], dbWhere:'', y_axis:'Latency (ms)'],
- SCPFintentEventTp: [ test:'SCPFintentEventTp', table:'intent_tp_tests', results:'intent_tp_results', file:'IntentEventTPDB', rFile:'SCPFintentEventTp.R n', extra:neighbors, finalResult:1, graphTitle:['Intent Throughput Test - neighbors=0','Intent Throughput Test - neighbors=4'], dbCols:'avg', dbWhere:[ 'AND scale=5 AND neighbors=0 ','AND scale=5 AND NOT neighbors=0' ], y_axis:'Throughput (Ops/sec)'],
+ SCPFbatchFlowResp: [ test:'SCPFbatchFlowResp', table:'batch_flow_tests', results:'batch_flow_results', file:'SCPFbatchFlowRespData', rFile:'SCPFbatchFlowResp.R', extra:none, finalResult:1, graphTitle:['Batch Flow Test - Post', 'Batch Flow Test - Del'], dbCols:[ 'elapsepost, posttoconfrm', 'elapsedel, deltoconfrm' ], dbWhere:'', y_axis:'Latency (ms)'],
+ SCPFintentEventTp: [ test:'SCPFintentEventTp', table:'intent_tp_tests', results:'intent_tp_results', file:'IntentEventTPDB', rFile:'SCPFintentEventTp.R n', extra:neighbors, finalResult:1, graphTitle:['Intent Throughput Test - neighbors=0','Intent Throughput Test - neighbors=4'], dbCols:'SUM( avg ) as avg', dbWhere:[ 'AND scale=5 AND neighbors=0 GROUP BY date','AND scale=5 AND NOT neighbors=0 GROUP BY date' ], y_axis:'Throughput (Ops/sec)'],
SCPFintentRerouteLat: [ test:'SCPFintentRerouteLat', table:'intent_reroute_latency_tests', results:'intent_reroute_latency_results', file:'IntentRerouteLatDB', rFile:'SCPFIntentInstallWithdrawRerouteLat.R n', extra:batches, finalResult:1, graphTitle:['Intent Reroute Test'], dbCols:'avg', dbWhere:'AND scale=5 AND batch_size=100', y_axis:'Latency (ms)'],
SCPFscalingMaxIntents: [ test:'SCPFscalingMaxIntents', table:'max_intents_tests', results:'max_intents_results', file:'ScalingMaxIntentDB', rFile:'SCPFscalingMaxIntents.R n', extra:none, finalResult:0],
- SCPFintentEventTpWithFlowObj: [ test:'SCPFintentEventTp --params TEST/flowObj:True', table:'intent_tp_fobj_tests', results:'intent_tp_fobj_results', file:'IntentEventTPflowObjDB', rFile:'SCPFintentEventTp.R y', extra:neighbors,finalResult:0],
+ SCPFintentEventTpWithFlowObj: [ test:'SCPFintentEventTp --params TEST/flowObj=True', table:'intent_tp_fobj_tests', results:'intent_tp_fobj_results', file:'IntentEventTPflowObjDB', rFile:'SCPFintentEventTp.R y', extra:neighbors,finalResult:0],
SCPFintentInstallWithdrawLat: [ test:'SCPFintentInstallWithdrawLat', table:'intent_latency_tests', results:'intent_latency_results', file:'IntentInstallWithdrawLatDB', rFile:'SCPFIntentInstallWithdrawRerouteLat.R n', extra:batches,finalResult:1, graphTitle:['Intent Installation Test','Intent Withdrawal Test'], dbCols:[ 'install_avg','withdraw_avg' ], dbWhere:'AND scale=5 AND batch_size=100', y_axis:'Latency (ms)'],
- SCPFintentRerouteLatWithFlowObj: [ test:'SCPFintentRerouteLat --params TEST/flowObj:True', table:'intent_reroute_latency_fobj_tests', results:'intent_reroute_latency_fobj_results', file:'IntentRerouteLatDBWithFlowObj', rFile:'SCPFIntentInstallWithdrawRerouteLat.R y', extra:batches, finalResult:0],
- SCPFscalingMaxIntentsWithFlowObj: [ test:'SCPFscalingMaxIntents --params TEST/flowObj:True', table:'max_intents_fobj_tests', results:'max_intents_fobj_results', file:'ScalingMaxIntentDBWFO', rFile:'SCPFscalingMaxIntents.R y', extra:none, finalResult:0],
- SCPFintentInstallWithdrawLatWithFlowObj: [ test:'SCPFintentInstallWithdrawLat --params TEST/flowObj:True', table:'intent_latency_fobj_tests', results:'intent_latency_fobj_results', file:'IntentInstallWithdrawLatDBWFO', rFile:'SCPFIntentInstallWithdrawRerouteLat.R y', extra:batches, finalResult:0],
+ SCPFintentRerouteLatWithFlowObj: [ test:'SCPFintentRerouteLat --params TEST/flowObj=True', table:'intent_reroute_latency_fobj_tests', results:'intent_reroute_latency_fobj_results', file:'IntentRerouteLatDBWithFlowObj', rFile:'SCPFIntentInstallWithdrawRerouteLat.R y', extra:batches, finalResult:0],
+ SCPFscalingMaxIntentsWithFlowObj: [ test:'SCPFscalingMaxIntents --params TEST/flowObj=True', table:'max_intents_fobj_tests', results:'max_intents_fobj_results', file:'ScalingMaxIntentDBWFO', rFile:'SCPFscalingMaxIntents.R y', extra:none, finalResult:0],
+ SCPFintentInstallWithdrawLatWithFlowObj: [ test:'SCPFintentInstallWithdrawLat --params TEST/flowObj=True', table:'intent_latency_fobj_tests', results:'intent_latency_fobj_results', file:'IntentInstallWithdrawLatDBWFO', rFile:'SCPFIntentInstallWithdrawRerouteLat.R y', extra:batches, finalResult:0],
SCPFmastershipFailoverLat: [test:'SCPFmastershipFailoverLat', table:'mastership_failover_tests', results:'mastership_failover_results', file:'mastershipFailoverLatDB', rFile:'SCPFmastershipFailoverLat.R', extra:none, finalResult:1, graphTitle:['Mastership Failover Test'], dbCols:[ 'kill_deact_avg,deact_role_avg' ], dbWhere:'AND scale=5', y_axis:'Latency (ms)' ]
]
echo("Testcases:")
-graph_generator_directory = "~/OnosSystemTest/TestON/JenkinsFile/SCPF/"
+graph_generator_directory = "~/OnosSystemTest/TestON/JenkinsFile/scripts/"
graph_saved_directory = "/var/jenkins/workspace/Pipeline_postjob_BM/"
def testsToRun = null
def prop = null
@@ -68,6 +68,7 @@
'WORKSPACE='+workSpace]){
sh '''#!/bin/bash -l
set -i # interactive
+ set +e
shopt -s expand_aliases # expand alias in non-interactive mode
export PYTHONUNBUFFERED=1
@@ -92,6 +93,7 @@
// For moving results
sh '''#!/bin/bash -i
+ set +e
# remove any leftover files from previous tests
sudo rm ${WORKSPACE}/*Result.txt
@@ -129,7 +131,7 @@
}
// Fetch Logs
sh '''#!/bin/bash
-
+ set +e
cd ~/OnosSystemTest/TestON/logs
echo "Job Name is: ${JOB_NAME}"
TestONlogDir=$(ls -t | grep ${TEST_NAME}_ |head -1)
@@ -146,13 +148,13 @@
fi'''
}
}
- if( prop["postResult"] == "true" ){
+ if( prop["manualRun"] == "false" ){
def post = build job: "Pipeline_postjob_BM", propagate: false
}
node("TestStation-BMs"){
sh '''#!/bin/bash
- if [ -e ''' + workSpace + "/" + testName + "Result.txt ] && grep -q \"1\" " + workSpace + "/" + testName + "Result.txt" + '''
+ if [ -e ''' + workSpace + "/*Result.txt ] && grep -q \"1\" " + workSpace + "/*Result.txt" + '''
then
echo ''' + testName + " : All passed." + '''
else
@@ -179,11 +181,11 @@
result = ""
for ( int i=0; i< SCPF[testName]['graphTitle'].size(); i++){
result += "Rscript " + graph_generator_directory + "SCPFLineGraph.R " + host + " " + port + " " + user + " " + pass + " \"" + SCPF[testName]['graphTitle'][i] + "\" " + branchName + " " + 100 + " \"SELECT " +
- checkIfList( testName, 'dbCols', i ) + " FROM " + SCPF[testName]['table'] + " WHERE branch=\'" + branchName + "\' " + checkIfList( testName, 'dbWhere', i ) +
- " ORDER BY date ASC LIMIT 100\" \"" + SCPF[testName]['y_axis'] + "\" " + graph_saved_directory + ";"
+ checkIfList( testName, 'dbCols', i ) + " FROM " + SCPF[testName]['table'] + " WHERE branch=\'" + branchName + "\' " + checkIfList( testName, 'dbWhere', i ) +
+ " ORDER BY date DESC LIMIT 100\" \"" + SCPF[testName]['y_axis'] + "\" " + graph_saved_directory + ";"
}
return result
}
def checkIfList( testName, forWhich, pos ){
- return SCPF[testName][forWhich] instanceof List ? SCPF[testName][forWhich][pos] : SCPF[testName][forWhich]
+ return SCPF[testName][forWhich].getClass().getName() != "java.lang.String" ? SCPF[testName][forWhich][pos] : SCPF[testName][forWhich]
}
\ No newline at end of file
diff --git a/TestON/JenkinsFile/USECASEJenkinsFile b/TestON/JenkinsFile/USECASEJenkinsFile
index 84577a2..3c78dbe 100644
--- a/TestON/JenkinsFile/USECASEJenkinsFile
+++ b/TestON/JenkinsFile/USECASEJenkinsFile
@@ -26,7 +26,7 @@
table_name = "executed_test_tests"
result_name = "executed_test_results"
-graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/testCaseGraphGenerator.R"
+graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
graph_saved_directory = "/var/jenkins/workspace/Pipeline_postjob_BM/"
echo("Testcases:")
@@ -93,7 +93,7 @@
// For the Wiki page
sh '''#!/bin/bash -i
-
+ set +e
echo "ONOS Branch is: ${ONOSBranch}"
echo "TestON Branch is: ${TestONBranch}"
@@ -129,7 +129,6 @@
def database_command = pass + "|psql --host=" + host + " --port=" + port + " --username=" + user + " --password --dbname onostest -c \"INSERT INTO " + table_name + " VALUES('\$DATE','" + result_name + "','" + testName + "',\$BUILD_NUMBER, '\$ONOSBranch', \$line);\""
sh '''#!/bin/bash
- set +e
export DATE=\$(date +%F_%T)
cd ~
pwd
@@ -145,7 +144,7 @@
}
// Fetch Logs
sh '''#!/bin/bash
-
+ set +e
cd ~/OnosSystemTest/TestON/logs
echo "Job Name is: " + ''' + testName + '''
TestONlogDir=$(ls -t | grep ${TEST_NAME}_ |head -1)
diff --git a/TestON/JenkinsFile/SCPF/SCPFIntentInstallWithdrawRerouteLat.R b/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
similarity index 95%
rename from TestON/JenkinsFile/SCPF/SCPFIntentInstallWithdrawRerouteLat.R
rename to TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
index 897460b..20b4ddd 100644
--- a/TestON/JenkinsFile/SCPF/SCPFIntentInstallWithdrawRerouteLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
@@ -129,6 +129,11 @@
dataFrame$type <- as.character( dataFrame$type )
dataFrame$type <- factor( dataFrame$type, levels=unique( dataFrame$type ) )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
+
# **********************************************************
# STEP 3: Generate graphs.
# **********************************************************
@@ -146,6 +151,8 @@
print( "Generating fundamental graph data." )
+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
@@ -165,12 +172,12 @@
fillLabel <- labs( fill="Type" )
chartTitle <- "Intent Install, Withdraw, & Reroute Latencies"
if ( args[ 1 ] == "y" ){
- chartTitle <- paste( chartTitle, "with Flow Objectives" )
+ chartTitle <- paste( chartTitle, "w/ FlowObj" )
}
chartTitle <- paste( chartTitle, "\nBatch Size =" )
chartTitle <- paste( chartTitle, fileData1[ 1,'batch_size' ] )
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+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
diff --git a/TestON/JenkinsFile/SCPF/SCPFLineGraph.R b/TestON/JenkinsFile/scripts/SCPFLineGraph.R
similarity index 93%
rename from TestON/JenkinsFile/SCPF/SCPFLineGraph.R
rename to TestON/JenkinsFile/scripts/SCPFLineGraph.R
index f9c6c05..4b1ead6 100644
--- a/TestON/JenkinsFile/SCPF/SCPFLineGraph.R
+++ b/TestON/JenkinsFile/scripts/SCPFLineGraph.R
@@ -93,8 +93,10 @@
dataFrame$Legend <- as.character( dataFrame$Legend )
dataFrame$Legend <- factor( dataFrame$Legend, levels=unique( dataFrame$Legend ) )
-# Adding a temporary reversed iterative list to the dataFrame so that there are no gaps in-between date numbers.
-dataFrame$iterative <- seq( 1, nrow( fileData ), by = 1 )
+# Adding a temporary iterative list to the dataFrame so that there are no gaps in-between date numbers.
+dataFrame$iterative <- rev( seq( 1, nrow( fileData ), by = 1 ) )
+
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
print( "Data Frame Results:" )
print( dataFrame )
@@ -113,6 +115,7 @@
# - x: x-axis values (usually iterative, but it will become date # later)
# - y: y-axis values (usually tests)
# - color: the category of the colored lines (usually legend of test)
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
mainPlot <- ggplot( data = dataFrame, aes( x = iterative, y = Values, color = Legend ) )
print( "Formatting main plot." )
@@ -127,7 +130,7 @@
fillLabel <- labs( fill="Type" )
legendLabels <- scale_colour_discrete( labels = names( fileData ) )
centerTitle <- theme( plot.title=element_text( hjust = 0.5 ) ) # To center the title text
-theme <- theme( axis.text.x = element_blank(), axis.ticks.x = element_blank(), plot.title = element_text( size = 18, face='bold' ) )
+theme <- theme( axis.text.x = element_blank(), axis.ticks.x = element_blank(), plot.title = element_text( size = 28, face='bold' ) )
fundamentalGraphData <- fundamentalGraphData + yScaleConfig + xLabel + yLabel + fillLabel + legendLabels + centerTitle + theme
print( "Generating line graph." )
diff --git a/TestON/JenkinsFile/SCPF/SCPFbatchFlowResp.R b/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
similarity index 92%
rename from TestON/JenkinsFile/SCPF/SCPFbatchFlowResp.R
rename to TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
index dbf18e9..476cafb 100644
--- a/TestON/JenkinsFile/SCPF/SCPFbatchFlowResp.R
+++ b/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
@@ -86,18 +86,25 @@
dataFrame$type <- as.character( dataFrame$type )
dataFrame$type <- factor( dataFrame$type, levels=unique( dataFrame$type ) )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
+
# **********************************************************
# STEP 3: Generate graphs.
# **********************************************************
print( "Generating fundamental graph data." )
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
+
mainPlot <- ggplot( data = dataFrame, aes( x = iterative, y = ms, fill = type ) )
xScaleConfig <- scale_x_continuous( breaks = dataFrame$iterative, label = dataFrame$date )
xLabel <- xlab( "date" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
@@ -135,6 +142,10 @@
dataFrame$type <- as.character( dataFrame$type )
dataFrame$type <- factor( dataFrame$type, levels=unique( dataFrame$type ) )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
# **********************************************************
# STEP 3: Generate graphs.
@@ -142,12 +153,14 @@
print( "Generating fundamental graph data." )
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
+
mainPlot <- ggplot( data = dataFrame, aes( x = iterative, y = ms, fill = type ) )
xScaleConfig <- scale_x_continuous( breaks = dataFrame$iterative, label = dataFrame$date )
xLabel <- xlab( "Build Date" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/SCPF/SCPFcbench.R b/TestON/JenkinsFile/scripts/SCPFcbench.R
similarity index 94%
rename from TestON/JenkinsFile/SCPF/SCPFcbench.R
rename to TestON/JenkinsFile/scripts/SCPFcbench.R
index 999504e..786a2fa 100644
--- a/TestON/JenkinsFile/SCPF/SCPFcbench.R
+++ b/TestON/JenkinsFile/scripts/SCPFcbench.R
@@ -86,17 +86,25 @@
colnames( dataFrame ) <- c( "ms", "type", "std", "date", "iterative" )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
+
# **********************************************************
# STEP 3: Generate graphs.
# **********************************************************
print( "Generating fundamental graph data." )
+
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
+
mainPlot <- ggplot( data = dataFrame, aes( x = iterative, y = ms, ymin = ms - std, ymax = ms + std ) )
xScaleConfig <- scale_x_continuous( breaks = dataFrame$iterative, label = dataFrame$date )
xLabel <- xlab( "date" )
yLabel <- ylab( "Responses / sec" )
fillLabel <- labs( fill="Type" )
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/SCPF/SCPFflowTp1g.R b/TestON/JenkinsFile/scripts/SCPFflowTp1g.R
similarity index 93%
rename from TestON/JenkinsFile/SCPF/SCPFflowTp1g.R
rename to TestON/JenkinsFile/scripts/SCPFflowTp1g.R
index 8350f38..2116035 100644
--- a/TestON/JenkinsFile/SCPF/SCPFflowTp1g.R
+++ b/TestON/JenkinsFile/scripts/SCPFflowTp1g.R
@@ -71,13 +71,13 @@
flowObjModifier <- "_fobj"
}
if ( args[ 8 ] == 'y' ){
- commandNeighborModifier <- "NOT "
+ commandNeighborModifier <- "scale=1 OR NOT "
}
command <- paste( "SELECT scale, avg( avg ), avg( std ) FROM flow_tp", flowObjModifier, sep="" )
-command <- paste( command, "_tests WHERE ", sep="" )
+command <- paste( command, "_tests WHERE (", sep="" )
command <- paste( command, commandNeighborModifier, sep="" )
-command <- paste( command, "neighbors = 0 AND branch = '", sep="" )
+command <- paste( command, "neighbors = 0 ) AND branch = '", sep="" )
command <- paste( command, args[ 7 ], sep="" )
command <- paste( command, "' AND date IN ( SELECT max( date ) FROM flow_tp", sep="" )
command <- paste( command, flowObjModifier, sep="" )
@@ -109,6 +109,11 @@
colnames( dataFrame ) <- c( "throughput", "type", "scale", "std" )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
+
# **********************************************************
# STEP 3: Generate graphs.
# **********************************************************
@@ -133,6 +138,9 @@
# - 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)
+
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
+
mainPlot <- ggplot( data = dataFrame, aes( x = scale, y = throughput, ymin = throughput - std, ymax = throughput + std, fill = type ) )
# Formatting the plot
@@ -152,7 +160,7 @@
chartTitle <- paste( chartTitle, "0" )
}
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
# Store plot configurations as 1 variable
fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/SCPF/SCPFhostLat.R b/TestON/JenkinsFile/scripts/SCPFhostLat.R
similarity index 94%
rename from TestON/JenkinsFile/SCPF/SCPFhostLat.R
rename to TestON/JenkinsFile/scripts/SCPFhostLat.R
index 58d0b9b..75e2a45 100644
--- a/TestON/JenkinsFile/SCPF/SCPFhostLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFhostLat.R
@@ -87,6 +87,10 @@
colnames( dataFrame ) <- c( "ms", "type", "scale", "std" )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
# **********************************************************
# STEP 3: Generate graphs.
@@ -94,12 +98,13 @@
print( "Generating fundamental graph data." )
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
mainPlot <- ggplot( data = dataFrame, aes( x = scale, y = ms, ymin = ms - std, ymax = ms + std ) )
xScaleConfig <- scale_x_continuous( breaks=c( 1, 3, 5, 7, 9) )
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/SCPF/SCPFintentEventTp.R b/TestON/JenkinsFile/scripts/SCPFintentEventTp.R
similarity index 92%
rename from TestON/JenkinsFile/SCPF/SCPFintentEventTp.R
rename to TestON/JenkinsFile/scripts/SCPFintentEventTp.R
index e7818d1..a8d8248 100644
--- a/TestON/JenkinsFile/SCPF/SCPFintentEventTp.R
+++ b/TestON/JenkinsFile/scripts/SCPFintentEventTp.R
@@ -71,13 +71,13 @@
flowObjModifier <- "_fobj"
}
if ( args[ 8 ] == 'y' ){
- commandNeighborModifier <- "NOT "
+ commandNeighborModifier <- "scale=1 OR NOT "
}
-command <- paste( "SELECT scale, avg( avg ) FROM intent_tp", flowObjModifier, sep="" )
-command <- paste( command, "_tests WHERE ", sep="" )
+command <- paste( "SELECT scale, SUM( avg ) as avg FROM intent_tp", flowObjModifier, sep="" )
+command <- paste( command, "_tests WHERE (", sep="" )
command <- paste( command, commandNeighborModifier, sep="" )
-command <- paste( command, "neighbors = 0 AND branch = '", sep="")
+command <- paste( command, "neighbors = 0 ) AND branch = '", sep="")
command <- paste( command, args[ 7 ], sep="" )
command <- paste( command, "' AND date IN ( SELECT max( date ) FROM intent_tp", sep="" )
command <- paste( command, flowObjModifier, sep="" )
@@ -107,6 +107,12 @@
colnames( dataFrame ) <- c( "throughput", "type", "scale" )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
+
+
# **********************************************************
# STEP 3: Generate graphs.
# **********************************************************
@@ -131,6 +137,8 @@
# - 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)
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
+
mainPlot <- ggplot( data = dataFrame, aes( x = scale, y = throughput, fill = type ) )
# Formatting the plot
@@ -150,7 +158,7 @@
chartTitle <- paste( chartTitle, "0" )
}
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
# Store plot configurations as 1 variable
fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/SCPF/SCPFmastershipFailoverLat.R b/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
similarity index 93%
rename from TestON/JenkinsFile/SCPF/SCPFmastershipFailoverLat.R
rename to TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
index 6ec3098..594a515 100644
--- a/TestON/JenkinsFile/SCPF/SCPFmastershipFailoverLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
@@ -104,28 +104,27 @@
stdData <- melt( stds )
colnames( stdData ) <- c( "ms", "type" )
+dataFrame <- na.omit( avgData ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( avgData )
+
# **********************************************************
# STEP 3: Generate graphs.
# **********************************************************
print( "Generating fundamental graph data." )
-barBaseLength <- 16
-if (min( c( avgData$ms, stdData$ms ) ) < 0){
- yMin <- min( c( avgData$ms, stdData$ms ) )
-} else {
- yMin <- 0
-}
-yMax <- max( c( avgData$ms, stdData$ms, max( avgs$deact_role_avg + avgs$kill_deact_avg ) ) ) * 1.05
+
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
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) )
-#xLimit <- xlim( min( avgData$scale - 1 ), max( avgData$scale + 1 ) )
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 = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + xScaleConfig + yLimit + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/SCPF/SCPFportLat.R b/TestON/JenkinsFile/scripts/SCPFportLat.R
similarity index 93%
rename from TestON/JenkinsFile/SCPF/SCPFportLat.R
rename to TestON/JenkinsFile/scripts/SCPFportLat.R
index 10af8a9..9eb38a5 100644
--- a/TestON/JenkinsFile/SCPF/SCPFportLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFportLat.R
@@ -98,6 +98,14 @@
downAvgsData$type <- as.character( downAvgsData$type )
downAvgsData$type <- factor( downAvgsData$type, levels=unique( downAvgsData$type ) )
+upAvgsData <- na.omit( upAvgsData ) # Omit any data that doesn't exist
+downAvgsData <- na.omit( downAvgsData ) # Omit any data that doesn't exist
+
+print( "Up Averages Results:" )
+print( upAvgsData )
+
+print( "Down Averages Results:" )
+print( downAvgsData )
# **********************************************************
# STEP 3: Generate graphs.
@@ -111,6 +119,8 @@
} 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 ) )
@@ -119,7 +129,7 @@
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + yLimit + xScaleConfig + xLabel + yLabel + fillLabel + theme
@@ -148,7 +158,7 @@
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 = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + yLimit + xScaleConfig + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/SCPF/SCPFscaleTopo.R b/TestON/JenkinsFile/scripts/SCPFscaleTopo.R
similarity index 95%
rename from TestON/JenkinsFile/SCPF/SCPFscaleTopo.R
rename to TestON/JenkinsFile/scripts/SCPFscaleTopo.R
index 9956ec8..87f1f57 100644
--- a/TestON/JenkinsFile/SCPF/SCPFscaleTopo.R
+++ b/TestON/JenkinsFile/scripts/SCPFscaleTopo.R
@@ -92,6 +92,11 @@
# Obtain the sum of the averages for the plot size and center of standard deviation bars.
avgsSum <- fileData$total_time
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
+
# **********************************************************
# STEP 3: Generate graphs.
# **********************************************************
@@ -117,6 +122,8 @@
}
yWindowMax <- max( avgsSum )
+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
@@ -133,8 +140,8 @@
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Latency (ms)" )
fillLabel <- labs( fill="Type" )
-chartTitle <- paste( "Topology Scaling Operation Latency" )
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+chartTitle <- paste( "Scale Topology Latency Test" )
+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
diff --git a/TestON/JenkinsFile/SCPF/SCPFscalingMaxIntents.R b/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
similarity index 94%
rename from TestON/JenkinsFile/SCPF/SCPFscalingMaxIntents.R
rename to TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
index 950083d..e5f54e5 100644
--- a/TestON/JenkinsFile/SCPF/SCPFscalingMaxIntents.R
+++ b/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
@@ -104,18 +104,25 @@
dataFrame$type <- as.character( dataFrame$type )
dataFrame$type <- factor( dataFrame$type, levels=unique( dataFrame$type ) )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
+print( "Data Frame Results:" )
+print( dataFrame )
+
# **********************************************************
# STEP 3: Generate graphs.
# **********************************************************
print( "Generating fundamental graph data." )
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
+
mainPlot <- ggplot( data = dataFrame, aes( x = scale, y = ms, fill = type ) )
xScaleConfig <- scale_x_continuous( breaks=c( 1, 3, 5, 7, 9) )
xLabel <- xlab( "Scale" )
yLabel <- ylab( "Max Number of Intents/Flow Rules" )
fillLabel <- labs( fill="Type" )
-theme <- theme( plot.title=element_text( hjust = 0.5, size = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + xScaleConfig + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/SCPF/SCPFswitchLat.R b/TestON/JenkinsFile/scripts/SCPFswitchLat.R
similarity index 93%
rename from TestON/JenkinsFile/SCPF/SCPFswitchLat.R
rename to TestON/JenkinsFile/scripts/SCPFswitchLat.R
index a68b516..9131be9 100644
--- a/TestON/JenkinsFile/SCPF/SCPFswitchLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFswitchLat.R
@@ -93,6 +93,14 @@
downAvgsData$type <- as.character( downAvgsData$type )
downAvgsData$type <- factor( downAvgsData$type, levels=unique( downAvgsData$type ) )
+upAvgsData <- na.omit( upAvgsData ) # Omit any data that doesn't exist
+downAvgsData <- na.omit( downAvgsData )
+
+print( "Up Averages Results:" )
+print( upAvgsData )
+
+print( "Down Averages Results:" )
+print( downAvgsData )
# **********************************************************
# STEP 3: Generate graphs.
@@ -108,13 +116,15 @@
}
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 = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + yLimit + xScaleConfig + xLabel + yLabel + fillLabel + theme
@@ -143,7 +153,7 @@
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 = 18, face='bold' ) )
+theme <- theme( plot.title=element_text( hjust = 0.5, size = 28, face='bold' ) )
fundamentalGraphData <- mainPlot + yLimit + xScaleConfig + xLabel + yLabel + fillLabel + theme
diff --git a/TestON/JenkinsFile/testCaseGraphGenerator.R b/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
similarity index 96%
rename from TestON/JenkinsFile/testCaseGraphGenerator.R
rename to TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
index 74138db..2c7e442 100644
--- a/TestON/JenkinsFile/testCaseGraphGenerator.R
+++ b/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
@@ -101,6 +101,8 @@
# Adding a temporary reversed iterative list to the dataFrame so that there are no gaps in-between build numbers.
dataFrame$iterative <- rev( seq( 1, nrow( fileData ), by = 1 ) )
+dataFrame <- na.omit( dataFrame ) # Omit any data that doesn't exist
+
print( "Data Frame Results:" )
print( dataFrame )
@@ -118,6 +120,7 @@
# - x: x-axis values (usually iterative, but it will become build # later)
# - y: y-axis values (usually tests)
# - color: the category of the colored lines (usually status of test)
+theme_set( theme_grey( base_size = 20 ) ) # set the default text size of the graph.
mainPlot <- ggplot( data = dataFrame, aes( x = iterative, y = Tests, color = Status ) )
print( "Formatting main plot." )
@@ -134,7 +137,7 @@
fillLabel <- labs( fill="Type" )
legendLabels <- scale_colour_discrete( labels = c( "Failed", "Passed", "Planned" ) )
centerTitle <- theme( plot.title=element_text( hjust = 0.5 ) ) # To center the title text
-theme <- theme( plot.title = element_text( size = 18, face='bold' ) )
+theme <- theme( plot.title = element_text( size = 28, face='bold' ) )
# Store plot configurations as 1 variable
fundamentalGraphData <- mainPlot + plannedColor + passedColor + failedColor + xScaleConfig + yScaleConfig + xLabel + yLabel + fillLabel + legendLabels + centerTitle + theme