diff --git a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.params b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.params
index 930aaf8..7bfb458 100755
--- a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.params
+++ b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.params
@@ -18,6 +18,8 @@
         <multiovs>multiovs.py</multiovs>
     </DEPENDENCY>
 
+    <TsharkPath>/tmp/scaleTopo_tshark_role_request</TsharkPath>
+
     <DATABASE>
         <dbPath>/tmp/scaleTopoResultDb</dbPath>
     </DATABASE>
@@ -30,6 +32,7 @@
         <start>New switch connection</start>
         <end>Topology DefaultTopology</end>
         <Disconnect>Switch disconnected callback</Disconnect>
+        <roleRequest>of_role_request</roleRequest>
     </SearchTerm>
 
     <GIT>
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
index 7c2e2d2..1a1e38f 100644
--- a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
+++ b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
@@ -10,7 +10,6 @@
     def CASE1( self, main ):
         import os
         import imp
-
         """
         - Construct tests variables
         - GIT ( optional )
@@ -32,6 +31,8 @@
         gitBranch = main.params[ 'GIT' ][ 'branch' ]
         main.dependencyPath = main.testOnDirectory + \
                               main.params[ 'DEPENDENCY' ][ 'path' ]
+        main.tsharkResultPath = main.params[ 'TsharkPath' ]
+        main.roleRequest = main.params[ 'SearchTerm' ]['roleRequest']
         main.multiovs = main.params[ 'DEPENDENCY' ][ 'multiovs' ]
         main.topoName = main.params[ 'TOPOLOGY' ][ 'topology' ]
         main.numCtrls = int( main.params[ 'CTRL' ][ 'numCtrls' ] )
@@ -67,31 +68,38 @@
                 main.CLIs.append( getattr( main, 'ONOScli%s' % (i+1) ) )
 
         main.allinfo = {} # The dictionary to record all the data from karaf.log
+
         for i in range( 2 ):
             main.allinfo[ i ]={}
             for w in range ( 3 ):
                 # Totaltime: the time from the new switchConnection to its end
                 # swConnection: the time from the first new switchConnection to the last new switchConnection
+                # lastSwToLastRr: the time from the last new switchConnection to the last role request
+                # lastRrToLastTopology: the time form the last role request to the last topology
                 # disconnectRate: the rate that shows how many switch disconnect after connection
-                main.allinfo[ i ][ 'info' + str( w ) ]= { 'totalTime': 0, 'swConnection': 0,'lastSwToTopology': 0, 'disconnectRate': 0 }
+                main.allinfo[ i ][ 'info' + str( w ) ]= { 'totalTime': 0, 'swConnection': 0, 'lastSwToLastRr': 0, 'lastRrToLastTopology': 0, 'disconnectRate': 0 }
 
         main.dbFilePath = main.params[ 'DATABASE' ][ 'dbPath' ]
         main.log.info( "Create Database file " + main.dbFilePath )
         resultDB = open(main.dbFilePath, 'w+' )
         resultDB.close()
 
+
         main.startUp = imp.load_source( wrapperFile1,
                                         main.dependencyPath +
                                         wrapperFile1 +
                                         ".py" )
+
         main.scaleTopoFunction = imp.load_source( wrapperFile2,
                                                   main.dependencyPath +
                                                   wrapperFile2 +
                                                   ".py" )
+
         main.topo = imp.load_source( wrapperFile3,
                                      main.dependencyPath +
                                      wrapperFile3 +
                                      ".py" )
+
         main.ONOSbench.scp( main.Mininet1,
                             main.dependencyPath +
                             main.multiovs,
@@ -286,8 +294,19 @@
                                     " topology failed to start" )
 
         time.sleep( main.MNSleep )
+        main.log.info( "Clean up Tshark" )
+        with open(main.tsharkResultPath, "w" ) as tshark:
+            tshark.write( "" )
+        main.log.info( "Starting Tshark capture" )
+        main.ONOSbench.tsharkGrep( main.roleRequest, main.tsharkResultPath, grepOptions='-E' )
         main.CLIs[ 0 ].activateApp( "org.onosproject.openflow" )
         time.sleep( main.MNSleep )
+        main.log.info( "Stop Tshark" )
+        main.ONOSbench.tsharkStop()
+        main.log.info( "Get role request time" )
+        with open( main.tsharkResultPath, "r" ) as resultFile:
+            resultText = resultFile.readlines()
+            resultFile.close()
 
     def CASE11( self, main ):
         """
@@ -302,8 +321,10 @@
             main.allinfo[ 0 ][ 'info' + str( i )][ 'totalTime' ] = main.scaleTopoFunction.getInfoFromLog( main, main.searchTerm[ 'start' ], 'first', main.searchTerm[ 'end' ], 'last', index=i, funcMode='TD' )
             # Calculate switch connection time
             main.allinfo[ 0 ][ 'info' + str( i )][ 'swConnection' ] = main.scaleTopoFunction.getInfoFromLog( main, main.searchTerm[ 'start' ], 'first', main.searchTerm[ 'start' ], 'last', index=i, funcMode='TD' )
-            # Calculate the time from last switch connection to the end
-            main.allinfo[ 0 ][ 'info' + str( i )][ 'lastSwToTopology' ] =  main.allinfo[ 0 ][ 'info' + str( i )][ 'totalTime' ] -  main.allinfo[ 0 ][ 'info' + str( i )][ 'swConnection' ]
+            # Calculate the time from last switch connection to the last role request
+            main.allinfo[ 0 ][ 'info' + str( i )][ 'lastSwToLastRr' ] = main.scaleTopoFunction.compareTimeDiffWithRoleRequest( main, main.searchTerm[ 'start' ], 'last', index=i )
+            # Calculate the time from the last role request to the last topology
+            main.allinfo[ 0 ][ 'info' + str( i )][ 'lastRrToLastTopology' ] = main.scaleTopoFunction.compareTimeDiffWithRoleRequest( main, main.searchTerm[ 'end' ], 'last', index=i )
             # Calculate the disconnecti rate
             main.allinfo[ 0 ][ 'info' + str( i )][ 'disconnectRate' ] = main.scaleTopoFunction.getInfoFromLog( main, main.searchTerm[ 'Disconnect' ], 'num', main.searchTerm[ 'start' ], 'num', index=i, funcMode='DR' )
         main.log.debug( "The data is " + str( main.allinfo[ 0 ] ) )
@@ -477,10 +498,10 @@
                 slowestNode = i
             # Calculate switch connection time
             main.allinfo[ 1 ][ 'info' + str( i )][ 'swConnection' ] = main.scaleTopoFunction.getInfoFromLog( main, main.searchTerm[ 'start' ], 'first', main.searchTerm[ 'start' ], 'last', index=i, funcMode='TD' )
-            # Calculate the time from last switch connection to the end
-            main.allinfo[ 1 ][ 'info' + str( i )][ 'lastSwToTopology' ] =  main.allinfo[ 1 ][
-            'info' + str( i )][ 'totalTime' ] -  main.allinfo[ 1 ][ 'info' + str( i )][
-            'swConnection' ]
+            # Calculate the time from last switch connection to the last role request
+            main.allinfo[ 1 ][ 'info' + str( i )][ 'lastSwToLastRr' ] = main.scaleTopoFunction.compareTimeDiffWithRoleRequest( main, main.searchTerm[ 'start' ], 'last', index=i )
+            # Calculate the time from the last role request to the last topology
+            main.allinfo[ 1 ][ 'info' + str( i )][ 'lastRrToLastTopology' ] = main.scaleTopoFunction.compareTimeDiffWithRoleRequest( main, main.searchTerm[ 'end' ], 'last', index=i )
             # Calculate the disconnecti rate
             main.allinfo[ 1 ][ 'info' + str( i )][ 'disconnectRate' ] = main.scaleTopoFunction.getInfoFromLog( main, main.searchTerm[ 'Disconnect' ], 'num', main.searchTerm[ 'start' ],'num', index=i, funcMode='DR' )
 
@@ -496,7 +517,8 @@
                 # put result from second capture into data base
                 temp += "," + str( "%.2f" % main.allinfo[ 1 ][ 'info' + str( slowestNode )][ 'totalTime' ] )
                 temp += "," + str( "%.2f" % main.allinfo[ 1 ][ 'info' + str( slowestNode )][ 'swConnection' ] )
-                temp += "," + str( "%.2f" % main.allinfo[ 1 ][ 'info' + str( slowestNode )][ 'lastSwToTopology' ] )
+                temp += "," + str( "%.2f" % main.allinfo[ 1 ][ 'info' + str( slowestNode )][ 'lastSwToLastRr' ] )
+                temp += "," + str( "%.2f" % main.allinfo[ 1 ][ 'info' + str( slowestNode )][ 'lastRrToLastTopology' ] )
                 temp += "," + str( "%.2f" % main.allinfo[ 1 ][ 'info' + str( slowestNode )][ 'disconnectRate' ] )
                 temp += "\n"
                 dbFile.write( temp )
@@ -512,4 +534,4 @@
                                                               "flow",
                                                               "ERROR",
                                                               "Except" ],
-                                                            "s" )
+                                                              "s" )
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
index 8db74cb..254956c 100644
--- a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
+++ b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
@@ -32,6 +32,44 @@
         main.log.error( "Got wrong string from log" )
         return -1
 
+def getRoleRequestTimeFromTshark( main ):
+    try:
+        main.log.info( "Get role request time" )
+        with open(main.tsharkResultPath, "r" ) as resultFile:
+            resultText = resultFile.readlines()
+            # select the last role request string
+            roleRequestString = resultText[ len( resultText ) - 1 ]
+            main.log.info( roleRequestString )
+            # get timestamp from role request string
+            roleRequestTime = roleRequestString.split( " " )
+            resultFile.close()
+            return float(roleRequestTime[1])
+    except IndexError:
+        main.log.error("Got wrong role request string from Tshark file")
+        return -1
+
+def compareTimeDiffWithRoleRequest(main, term, Mode, index=0 ):
+    '''
+    Description:
+        Compare the time difference between the time of target term and the time of role request
+        Inclides onosclidriver functions
+
+    '''
+    try:
+        termInfo = main.CLIs[ index ].logSearch( term, mode=Mode)
+        termTime = getTimestampFromString( main, termInfo[ 0 ] )
+        roleRequestTime = getRoleRequestTimeFromTshark( main )
+        if termTime == -1 or roleRequestTime == -1:
+            main.writeData = -1
+            main.log.error( "Can't compare the difference with role request time" )
+            return -1
+	# Only concern about the absolute value of difference.
+        return abs( roleRequestTime - termTime )
+    except IndexError:
+        main.log.error( "Catch the wrong information of search term " )
+        main.writeData = -1
+        return -1
+
 def getInfoFromLog( main, term1, mode1, term2, mode2, index=0, funcMode='TD' ):
     '''
     Description:
