Find out the amount of data sent and received by the WCF host?

I have an application that hosts the WCF service (net.tcp) that receives and sends data. Is there any way to find out how much data has been transferred since the host started?

+3
source share
6 answers

I would suggest that the performance counters (perfmon) of the .NET CLR Networking \ Bytes Sent and the .NET CLR Networking \ Bytes are obtained for the process instance you are interested in, although I have never used them directly, they can provide the information I'm looking for.

+1
source

WCF has its own counters, this will help you get the necessary information.

for this you must enable them

like this

<configuration>
    <system.serviceModel>
        <diagnostics performanceCounters="All" /> // use this line.
    </system.serviceModel>
</configuration>

, visble hwn.

ServiceModelEndpoint 3.0.0.0 + ServiceModelOperation 3.0.0.0 + ServiceModelService 3.0.0.0

, ServiceModelOperation 3.0.0.0 u , /.

+1

, . .

PerfMon, WCF - , , ....

, : , , .

0

DotNet, NetLimiter,

0

, " " WCF. WCF . , BindingElementExtension IMessageInterceptor , , . .

WCF, , , .

0

I can confirm that the .NET CLR network counters are working correctly for WCF services. There is an initial bit of unmanaged network activity that you will not capture, but that will be a small percentage of the total time. I compared these CLR network counters with other tools and found that they line up for the client / server that I am testing.

0
source

Source: https://habr.com/ru/post/1715522/


All Articles