Vamsi Tokala's blogVamsi Tokalahttp://www.blogger.com/profile/16140414157154381815noreply@blogger.comBlogger42125
Updated: 15 hours 59 min ago
Performance testing IPAD/Mobile applicatins
Recently customers are requesting for performance testing IPAD/Mobile applications and I came across such a requirement recently. The challenge is to simulate the traffic and the typical approach to capture traffic using tools like LoadRunner may not work in this case due to the reasons below.
· Tools like LoadRunner can’t be installed in IPAD/smart phones to record the flow and capture the communication.
· Network capturing tools like Wireshark and Fiddler can’t be installed in IPAD. The approach is to route the traffic from IPAD to a hub/router and capturing the communication using network monitoring tools like wireshark.
1) Hub takes packets sent from one port and transmits (repeats) them to every other port on the device. For example, if a computer on port 1 of a 4-port hub needs to send data to a computer on port 2, the hub sends those packets to ports 1, 2, 3, and 4. When computer sends data, all computers connected to the hub receive it. Connect a computer to the hub which has Wireshark or fiddler installed to capture the communication.
2) Second approach is to connect to a router and allow traffic to go through the proxy. The below link has the approach followed by my team to capture communication using wireless router and fiddler
https://docs.google.com/document/d/1yh2Yi8MBNl0X4ClTZxYAl0iXEOQs8ZeZcJ1Kd4Cldq4/edit# Finally download the BPC toolkit available in my blog to convert fiddler output to LoadRunner script.
Note: HP developed some Mobile apps protocol to test Mobile applications which takes Wireshark network trace as an input to create a script. Purchasing license for this protocol is not required if the above approach is followed
@2011, copyright Vamsidhar Tokala
Categories: Load & Perf Testing
Identifying Memory leaks in .Net using winDBG
Identifying Memory Leaks due to object references in Finalize queue
Load the SOS debugger extension for a CLR 4.0 application
.loadby sos clr
1) Identify the objects in finalizeQueue which survived Garbage collection
!fq
SyncBlocks to be cleaned up: 0
MTA Interfaces to be released: 0
STA Interfaces to be released: 0
----------------------------------
generation 0 has 1 finalizable objects (000000008ba63058->000000008ba63060)
generation 1 has 15 finalizable objects (000000008ba62fe0->000000008ba63058)
generation 2 has 14884 finalizable objects (000000008ba45ec0->000000008ba62fe0)
Ready for finalization 0 objects (000000008ba63060->000000008ba63060)
…
000007ff01d58610 2 1024 System.Data.DataTable
000007ff0164e298 4 1120 System.Diagnostics.Process
000007ff01d82738 8 1728 System.Data.DataColumn
000007ff017235a0 16 1920 System.Threading.OverlappedData
000007ff001f1780 28 2464 System.Threading.Thread
000007ff006764b8 52 3744 System.Reflection.Emit.DynamicResolver
000007ff0026fba8 66 4224 System.Threading.ReaderWriterLock
000007ff01e7bb00 314 10048 System.Data.SqlClient.SNIPacket
000007ff01e717e0 546 21840 System.Data.SqlClient.SNIHandle
000007ff01e49f30 314 32656 System.Data.SqlClient.SqlConnection
000007ff02933bf0 302 45904 System.Data.SqlClient.SqlDataAdapter
000007ff0166d240 398 70048 System.Diagnostics.PerformanceCounter
000007ff01e0d0e8 1510 338240 System.Data.SqlClient.SqlCommand
000007ff0057d8f8 11209 358688 System.WeakReference
2) You can also print the details of the finalizable objects for Gen2 using the above details
dd 000000008ba45ec0 000000008ba62fe0
3) Identify the suspected object having leaks
!dumpheap -type System.Data.SqlClient.SqlCommand
Address MT Size
0000000010c43f40 000007ff01e0d0e8 224
0000000010c44020 000007ff01e0d0e8 224
0000000010c44198 000007ff01e0d0e8 224
0000000010c44278 000007ff01e0d0e8 224
0000000010c444e8 000007ff01e0d0e8 224
4) Identify the GC roots for the objects. It contains the call stack
!gcroot 0000000010c43f40
Scan Thread 15 OSTHread 1bc0
Scan Thread 16 OSTHread 1d74
Scan Thread 19 OSTHread 3200
Scan Thread 17 OSTHread 21f0
Scan Thread 18 OSTHread 3564
Scan Thread 20 OSTHread 322c
Scan Thread 21 OSTHread 2b80
Scan Thread 28 OSTHread 2e5c
Scan Thread 29 OSTHread 35d0
Scan Thread 30 OSTHread 3bc
Scan Thread 31 OSTHread 2770
Scan Thread 33 OSTHread 19b4
Scan Thread 34 OSTHread 534
Scan Thread 35 OSTHread 3280
Scan Thread 36 OSTHread 1908
Scan Thread 37 OSTHread 344c
Scan Thread 38 OSTHread 13d4
Scan Thread 39 OSTHread 21d4
Scan Thread 40 OSTHread 31a4
DOMAIN(0000000001AB88B0):HANDLE(Pinned):1217c0:Root: 000000002070f040(System.Object[])->
00000000108c9ac0(System.Collections.Hashtable+SyncHashtable)->
00000000108c91e8(System.Collections.Hashtable)->
000000001171efc0(System.Collections.Hashtable+bucket[])->
00000000120a3768(System.Collections.Hashtable)->
00000000120a37c0(System.Collections.Hashtable+bucket[])->
00000000120a3820(System.Collections.Hashtable)->
00000000120fa180(System.Collections.Hashtable+bucket[])->
00000000120b7200(System.Collections.Generic.Dictionary`2[[ATOM.AS.CobolBase.CobolProgramName, ATOM.AS.CobolBase],[ATOM.AS.CobolBase.CobolProgram, ATOM.AS.CobolBase]])->
00000000120b7360(System.Collections.Generic.Dictionary`2+Entry[[ATOM.AS.CobolBase.CobolProgramName, ATOM.AS.CobolBase],[ATOM.AS.CobolBase.CobolProgram, ATOM.AS.CobolBase]][])->
00000000120b7258(ATOM.AS.CobolBase.CobolProgram)->
00000000120b7310(System.Collections.Generic.List`1[[ATOM.AS.CobolBase.IProgramEvents, ATOM.AS.CobolBase]])->
0000000019b0f918(System.Object[])->
0000000019b0f590(ATOM.AS.DataAccess.DataAccess)->
0000000019b13c40(ATOM.AS.DataAccess.ProviderSQL)->
0000000019b13d70(System.Data.SqlClient.SqlCommand)->
0000000019b15978(System.Data.SqlClient.SqlCommand+CachedAsyncState)
@2011, copyright Vamsidhar Tokala
Load the SOS debugger extension for a CLR 4.0 application
.loadby sos clr
1) Identify the objects in finalizeQueue which survived Garbage collection
!fq
SyncBlocks to be cleaned up: 0
MTA Interfaces to be released: 0
STA Interfaces to be released: 0
----------------------------------
generation 0 has 1 finalizable objects (000000008ba63058->000000008ba63060)
generation 1 has 15 finalizable objects (000000008ba62fe0->000000008ba63058)
generation 2 has 14884 finalizable objects (000000008ba45ec0->000000008ba62fe0)
Ready for finalization 0 objects (000000008ba63060->000000008ba63060)
…
000007ff01d58610 2 1024 System.Data.DataTable
000007ff0164e298 4 1120 System.Diagnostics.Process
000007ff01d82738 8 1728 System.Data.DataColumn
000007ff017235a0 16 1920 System.Threading.OverlappedData
000007ff001f1780 28 2464 System.Threading.Thread
000007ff006764b8 52 3744 System.Reflection.Emit.DynamicResolver
000007ff0026fba8 66 4224 System.Threading.ReaderWriterLock
000007ff01e7bb00 314 10048 System.Data.SqlClient.SNIPacket
000007ff01e717e0 546 21840 System.Data.SqlClient.SNIHandle
000007ff01e49f30 314 32656 System.Data.SqlClient.SqlConnection
000007ff02933bf0 302 45904 System.Data.SqlClient.SqlDataAdapter
000007ff0166d240 398 70048 System.Diagnostics.PerformanceCounter
000007ff01e0d0e8 1510 338240 System.Data.SqlClient.SqlCommand
000007ff0057d8f8 11209 358688 System.WeakReference
2) You can also print the details of the finalizable objects for Gen2 using the above details
dd 000000008ba45ec0 000000008ba62fe0
3) Identify the suspected object having leaks
!dumpheap -type System.Data.SqlClient.SqlCommand
Address MT Size
0000000010c43f40 000007ff01e0d0e8 224
0000000010c44020 000007ff01e0d0e8 224
0000000010c44198 000007ff01e0d0e8 224
0000000010c44278 000007ff01e0d0e8 224
0000000010c444e8 000007ff01e0d0e8 224
4) Identify the GC roots for the objects. It contains the call stack
!gcroot 0000000010c43f40
Scan Thread 15 OSTHread 1bc0
Scan Thread 16 OSTHread 1d74
Scan Thread 19 OSTHread 3200
Scan Thread 17 OSTHread 21f0
Scan Thread 18 OSTHread 3564
Scan Thread 20 OSTHread 322c
Scan Thread 21 OSTHread 2b80
Scan Thread 28 OSTHread 2e5c
Scan Thread 29 OSTHread 35d0
Scan Thread 30 OSTHread 3bc
Scan Thread 31 OSTHread 2770
Scan Thread 33 OSTHread 19b4
Scan Thread 34 OSTHread 534
Scan Thread 35 OSTHread 3280
Scan Thread 36 OSTHread 1908
Scan Thread 37 OSTHread 344c
Scan Thread 38 OSTHread 13d4
Scan Thread 39 OSTHread 21d4
Scan Thread 40 OSTHread 31a4
DOMAIN(0000000001AB88B0):HANDLE(Pinned):1217c0:Root: 000000002070f040(System.Object[])->
00000000108c9ac0(System.Collections.Hashtable+SyncHashtable)->
00000000108c91e8(System.Collections.Hashtable)->
000000001171efc0(System.Collections.Hashtable+bucket[])->
00000000120a3768(System.Collections.Hashtable)->
00000000120a37c0(System.Collections.Hashtable+bucket[])->
00000000120a3820(System.Collections.Hashtable)->
00000000120fa180(System.Collections.Hashtable+bucket[])->
00000000120b7200(System.Collections.Generic.Dictionary`2[[ATOM.AS.CobolBase.CobolProgramName, ATOM.AS.CobolBase],[ATOM.AS.CobolBase.CobolProgram, ATOM.AS.CobolBase]])->
00000000120b7360(System.Collections.Generic.Dictionary`2+Entry[[ATOM.AS.CobolBase.CobolProgramName, ATOM.AS.CobolBase],[ATOM.AS.CobolBase.CobolProgram, ATOM.AS.CobolBase]][])->
00000000120b7258(ATOM.AS.CobolBase.CobolProgram)->
00000000120b7310(System.Collections.Generic.List`1[[ATOM.AS.CobolBase.IProgramEvents, ATOM.AS.CobolBase]])->
0000000019b0f918(System.Object[])->
0000000019b0f590(ATOM.AS.DataAccess.DataAccess)->
0000000019b13c40(ATOM.AS.DataAccess.ProviderSQL)->
0000000019b13d70(System.Data.SqlClient.SqlCommand)->
0000000019b15978(System.Data.SqlClient.SqlCommand+CachedAsyncState)
@2011, copyright Vamsidhar Tokala
Categories: Load & Perf Testing