I have been using the Compuware Devpartner studio for quite some time for profiling our application for memory and performance, and I found it quite useful. Recently we had a memory leak issue in one of our windows service. I tried using the DevPartner profiling for memory on it, but alas I could not profile a service!!
Later out of frustration I looked into the installation directory, and found lots of exe’s and out of curiosity I opened them one by one. To my pleasant surpise I found one exe DPAnalysis.exe which was what I wanted. It was a command line tool for doing all sorts of supported Analysis
- Performance
- Coverage
- Memory
- Performance expert
2) DPAnalysis /config config.xml
a) AnalysisType: Set the run-time analysis type. Performance is default.
/PERF[ORMANCE] Set analysis type to DevPartner Performance Analysis
/COV[ERAGE] Set analysis type to DevPartner Coverage Analysis
/MEM[ORY] Set analysis type to DevPartner Memory Analysis
/EXP[ERT] Set analysis type to DevPartner Performance Expert
b) DataCollection: Enable/Disable data collection for a given target.
DOES NOT LAUNCH the target.
/E[NABLE] Enable data collection for the specified process or service
/D[ISABLE] Disable data collection for the specified process or service
c) OtherOptions:
/O[UTPUT] Specify the session file output directory and/or name with
/W[ORKINGDIR] Specify the process' working directory
/H[OST] Specify target's host machine
/NOWAIT Don't wait for process to exit, just wait for it to start
/N[EWCONSOLE] Run the process in its own command window
d) AnalysisOptions:
/NO_MACH5 Disables excluding time spent on other threads
/NM_METHOD_GRANULARITY Set data collection granularity to method-level (line-level is default)
/EXCLUDE_SYSTEM_DLLS Exclude data collection for system dlls (Perf only)
/NM_ALLOW_INLINING Enable run-time instrumentation of inline methods
/NO_OLEHOOKS Disable collection of COM
/NM_TRACK_SYSTEM_OBJECTS Track system object allocation (Memory only)
e) TargetType: Identify target process or service. MUST BE LAST OPTION.
All arguments after the target name/path are passed directly to the target.
/P[ROCESS] Target is an exe filename (followed by arguments to the process)
/S[ERVICE] Target is a service name (followed by arguments to the service)
2)
/C[ONFIG] Path to configuration file that includes all startup information. Note: no other options can be used with /Config
For profiling the windows service I used the following command”
DPAnalysis /MEM /E /S “my service name”
No comments:
Post a Comment