views:

49

answers:

2

I am writing WCF service hosted in WinForms application. Is there some way to monitor performance and statistics(count of instances, count of calls to endpoints, duration of calls, etc...) about service and display them in Form in which service is hosted?

+1  A: 

WCF can be configured to expose performance counters that can be monitored via perfmon or any other monitoring software that can access the performance logs.

Here is a good article: How to consume ETW events from C# :

In my previous post I explained how to collect ETW events from URL Rewrite (or any other IIS provider) and then display those structured events in the Event Viewer. Now I want to show you how to collect ETW events using C#.

The .NET Framework 3.5 provides a new namespace System.Diagnostics.Eventing.Reader where you can find useful classes for publishing ETW events, but doesn’t provide a mechanism for consuming, so I had to write a class EventTraceWatcher for simplify things.

Andrew Hare
Thanks a lot, it works and now I can monitor performance by perfmon.exe in windows.But I can`t find if it is possible to read this logs from .NET and display in my form.
Cicik
@Cicik: Good question! I have updated my answer.
Andrew Hare
A: 

finally i used this solution

Cicik