473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

I want to write my own profiler

I want to write myself a simple profiler. It would run a .NET
application and wait for the application to exit. When it exits I want
to see a grid containing 1) fully-qualified method/property name, 2)
the number of times it was called, 3) the amount of CPU time spent in
that function.

I can start a process, but I'm unsure what to look for. Is there some
global output pipe that .NET applications allow other applications to
hook into? How does that work? How does Visual Studio monitor all the
managed modules that were loaded when you execute in debug mode?

Jun 1 '07 #1
2 2260
On Jun 2, 12:27 am, not_a_commie <notacom...@gmail.comwrote:
I want to write myself a simple profiler. It would run a .NET
application and wait for the application to exit. When it exits I want
to see a grid containing 1) fully-qualified method/property name, 2)
the number of times it was called, 3) the amount of CPU time spent in
that function.

I can start a process, but I'm unsure what to look for. Is there some
global output pipe that .NET applications allow other applications to
hook into? How does that work? How does Visual Studio monitor all the
managed modules that were loaded when you execute in debug mode?
I think you can find out the assembly references and associated method
references. Use some counting mechanism for these references. I'm not
sure how the execution breaks down into countable blocks. Probably we
can use a dictionary to store the assembly name and the count.

Jun 1 '07 #2
"not_a_commie" <no********@gmail.comwrote:
>I want to write myself a simple profiler.
There are alot of resources on the web to help you get started with this:
http://msdn.microsoft.com/msdnmag/issues/01/12/hood/
http://msdn.microsoft.com/msdnmag/is...r/default.aspx
http://msdn2.microsoft.com/en-us/library/bb264782.aspx
http://blogs.msdn.com/davbr/

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins
Jun 1 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: gwaddell | last post by:
I have an Access XP ADE application connected to a SQL Server 7.0 SP4 database. I have created a timestamp column in the main table. Unfortunately, I am now getting persistent write conflict...
0
by: Jeff Mair | last post by:
Hello all, I haven't been using profiler for a terribly long time, and I've come across something that I just can't figure out. I'm running MS Virtual PC to run a Win2K Server OS with SQL...
8
by: patrickshroads | last post by:
I am running a profiler trace against a database and noticed that the reads column always shows 0. When running the same trace against another machine I get back values in the reads column. I took...
0
by: DraguVaso | last post by:
Hi, I'm using for a while DevPartner Profiler (http://www.compuware.com/products/devpartner/resources/profiler/profiler.as p), but unfortunately it works only for 2002 and 2003. Is there a...
9
by: Franco Gustavo | last post by:
Hi, All What's is the best .net profiler for Debug an application. I have to buy one but I don't know which one!! I tried some of them like Borland and AQTime. My big problem is, my...
4
by: pnp | last post by:
Which is the best profiler for C# apps? Thanks in advance, Peter
3
by: Maansi Gupta | last post by:
Platform - Windows 2000 Professional , VC .NET 7.1 Hello, I have recently ported my source code from Visual Studio 6.0 to .NET 7.1 Previously with Visual Studio 6.0 I was using the profiler...
1
by: ofirmgr | last post by:
im trying to understand how the profiler works. so i started 2 profilers,one listen to another and I saw the profiler is running: exec sp_trace_create @P1 output, 1, NULL, NULL, NULL which means...
2
by: Paul Ritchie | last post by:
A few years ago I used a Profiler (I forget the name) on my Delphi code at the time and got fantastic results showing both: a) lines of code that took the longest to execute and b) lines of code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.