performancecounter

How to version a performance counter category?

I have a performance counter category. The counters in this category may change for my next release so when the program starts, I want to check if the category exists and it is the correct version - if not, create the new category. I can do this by storing a GUID in the help string but this is obviously smelly. Is it possible to do th...

Need example of using CounterDelta32 PerformanceCounter

I'm trying to show the number of times an operation occurred since the last performance iteration. I have created a performance counter using the following: var clearStateCounterData = new CounterCreationData() { CounterName = ClearStateName, CounterHelp = "The number of times the service state has been cleared since the last p...

How to use the PerformanceCounter to find the bandwidth used by my appication?

there are 2 problems with the following code: 1- it gets bandwidth used by all network cards... 2- it gets all bandwidth used.... I wanna be able to change it to do the following: 1- dynamically use the network card I am using to connect to the internet. 2- to show only the bandwidth used by the current application private voi...

Strange behaivour of process counters

Hi, All! We have web application in which we are using some performance counters. For cases when there are more then one application run simultaneously we have code for determining current instance name: int processId = GetProcessID(); PerformanceCounterCategory processCategory = new PerformanceCounterCategory("Process"); string...

Best Method to Log Rows in a Data Flow for SSIS Performance Counters

I have a centralized table that is populated with row counts and process-level information for every stored procedure on my server. What is the best method for logging rows in a data flow in SSIS and logging start and end times for individual data flows? The only method I have found for logging data flow statistics is to log OnProgress...

Can the performance timer "% Time in GC" be wrong?

We found that, since today, the "% Time in GC" (percent time in Garbage Collector) performance timer, steadily stood on 100% with only occasionally a bit lower. Even when at night no visitors were online. Then I placed App_Offline.htm in the root. Usually this brings down all ASP.NET activity. But for some odd reason, the "% Time in GC"...

How to intrepret values of the ASP.NET Requests/sec performance counter?

If I monitor ASP.NET Requests/sec performance counter every N seconds, how should I interpret the values? Is it number of requests processed during sample interval divided by N? or is it current requests/sec regardless the sample interval? ...

What is the most appropriate performance counter type for measuring operation time?

Say I have a method Foo() and I want to measure the time in milliseconds it took to execute which type of Windows Performance Counter should I be using? var stopwatch = new Stopwatch(); stopwatch.Start(); Foo(); stopwatch.Stop(); counter.RawValue = stopwatch.TotalMilliseonds; Currently I'm using NumberOfItems64 but that persists the l...

Performance Counter maximum during interval?

I have an application that is executing a number of operations. I have some performance counters that measure the average time it takes to execute the operation between intervals. I would like a counter that for each interval will display the maximum time that it took to handle one of the operations since the last interval. For an ave...

Can't find "requests/sec" performance counter in "asp.net applications" category on a windows server 2003

I have two pressure test machines, one of them can't display the correct performance counter, the requests/sec performance counter in asp.net applications category didn't update, and, can't find W3SVC...... instance to choose ... any one got this wired problem before? ...

Is the Network Performance counter "Bytes Total/sec" is reliable

All, I'm building a network intensive application to consume real time financial marketdata and the network team is suspicious regarding its bandwidth usage per instance. I'm trying to use the System.Diagnostic performance counter "Bytes Total/sec" in the "Network interface" to get an idea of my application footprint on the network. H...

The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly

I am getting repeated errors about the ReadOnly property on performance counters whenever I try to debug a .NET windows service app. This app works fine on x86 windows vista, or x86 windows 2003. It's just stopped working on my new 64bit dev machine. I've run the relevant InstallUtil invocations on 64bit and 32bit command line VCVARS.b...

How do I get the counter for facebook share button to show all the time?

I have a twitter share button and a facebook share button in my blog page. The twitter counter always shows, but the facebook one only shows when you post something, and then goes away when the page is refreshed and does not show up again until something is posted. I want it to show all the time as to adhere to design cohesiveness. ...

Outliers during Performance Evaluation

Hello all, I am trying to do some performance measurements using Intels RDTSC, and it is quite odd the variations I get during different testruns. In most cases my benchmark in C needs 3000000 Mio cycles, however, exactly the same execution can in some cases take 5000000, almost double as much. I tried to have no intense workloads runni...

Performance counters for current threads

Hi, I am building a .NET windows service which is using an unmanaged C++ dll. both of my service and the c++ dll are using multi threading. I am running out of memory after some time (hours) while processing. I tried to measure the number of threads using "Performance counters" and I monitors the following values: # of current logical T...

Growing in the "Virtual bytes" performance counter

Hi, I am suffering from an "Out of memory" exception in my Windows Service after running it for few hours under huge workload. I used the following performance counters to detect memory leaks: # bytes in all heap Private bytes Virtual bytes The first 2 counters are going up and down regularly ... I cant see anything wrong in them. bu...

Multiple Processors and PerformanceCounter C#

I'm trying to figure out how to gather the current usage percentage of each individual processor on my computer. If I use "System.Environment.ProcessorCount;" I can get the number of processors on my computer and it currently returns "2". I either don't know what I'm looking for or there isn't very much info about this on the internet....

What to measure using PerfMon for a .NET WCF web service?

I am looking into Performance issues of an Asp.Net 2.0 Web Site which uses a WCF service. On the Web and the WCF Host Service I am adding some Perf Counters to analyse the application behaviour. What are the Performance Counters which will be useful. I have created a partial list. Can someone suggest me if I am missing any important coun...

Webservice wcf performance counters for queue

Hi, Am trying to performance test a wcf webservice which should get a lot of traffic. Which performance counters are sensible to use and for which purpose..Naturally I am looking at CPU and RAM, but I would like to know when IIS is queing and when its having trouble... Any advice on sensible performance counters gratefully received... ...

Performance Counter Category Names? (C#)

I'm trying to program in a performance counter into my C# application that launches another process and checks the processor usage of that launched process. As I understand it, the performance counter class requires me to assign a category name , a counter name, and a process name. I can get the process name easily enough, but is there a...