Create add operation perf results in lisp 93/28693/4
authorLorand Jakab <lojakab@cisco.com>
Fri, 23 Oct 2015 11:00:45 +0000 (14:00 +0300)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 23 Oct 2015 14:00:18 +0000 (14:00 +0000)
The initial version of the lispflowmapping performance tests only
computed the map request rate, after the mappings were added.  This
patch measures the time it takes to add the mappings and computes the
add rate.

Change-Id: Iae7a46c4a926b5710bd66d0c0861addeb9d7e8f5
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
csit/suites/lispflowmapping/performance/010_Southbound_MapRequest.robot

index 505c38be3a0a2d4da30a8c8057096cb8dc731db8..358521bdc92c22186e96986148dd912c6fba4721 100644 (file)
@@ -3,6 +3,7 @@ Documentation     Test suite to determine the southbound Map-Request serving rat
 Suite Setup       Prepare Environment
 Suite Teardown    Destroy Environment
 Library           Collections
+Library           DateTime
 Library           OperatingSystem
 Library           RequestsLibrary
 Library           String
@@ -18,11 +19,16 @@ ${MAPPING_BLASTER}    ${TOOLS_DIR}/mapping_blaster.py
 ${REPLAY_PPS}     100000
 ${REPLAY_CNT}     1000
 ${REPLAY_FILE}    encapsulated-map-requests-sequential.pcap
-${RESULTS_FILE}    pps.csv
+${RESULTS_FILE}    results.csv
 
 *** Test Cases ***
 Add Simple IPv4 Mappings
+    ${start_date}=    Get Current Date
     Run Process With Logging And Status Check    ${MAPPING_BLASTER}    --host    ${CONTROLLER}    --mappings    ${MAPPINGS}
+    ${end_date}=    Get Current Date
+    ${add_seconds}=    Subtract Date From Date    ${end_date}    ${start_date}
+    Log    ${add_seconds}
+    Set Suite Variable    ${add_seconds}
 
 Generate Test Traffic
     Reset Stats
@@ -30,17 +36,18 @@ Generate Test Traffic
     ...    --host    ${CONTROLLER}    --port    4342    ${REPLAY_FILE}
     ${partial}=    Fetch From Left    ${result.stdout}    s =
     Log    ${partial}
-    ${seconds}=    Fetch From Right    ${partial}    ${SPACE}
-    ${seconds}=    Convert To Number    ${seconds}
-    Log    ${seconds}
-    Set Suite Variable    ${seconds}
+    ${get_seconds}=    Fetch From Right    ${partial}    ${SPACE}
+    ${get_seconds}=    Convert To Number    ${get_seconds}
+    Log    ${get_seconds}
+    Set Suite Variable    ${get_seconds}
 
 Compute And Export MapReply Rate
+    ${rpcs}=    Evaluate    ${MAPPINGS}/${add_seconds}
     ${txmrep}=    Get Transmitted Map-Requests Stats
-    ${pps}=    Evaluate    ${txmrep}/${seconds}
+    ${pps}=    Evaluate    ${txmrep}/${get_seconds}
     Log    ${pps}
-    Create File    ${RESULTS_FILE}    replies/s\n
-    Append To File    ${RESULTS_FILE}    ${pps}\n
+    Create File    ${RESULTS_FILE}    store/s,replies/s\n
+    Append To File    ${RESULTS_FILE}    ${rpcs},${pps}\n
 
 *** Keywords ***
 Reset Stats