Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to enable WCF performance counters

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "how to enable WCF performance counters", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to enable WCF performance counters.

With the development of the times, the WCF launched by Microsoft is used by more and more of us. We analyze the performance of WCF. It is a complex task to design, build, maintain and version control distributed applications. Security, reliability, transactional, and scalable factors and tasks become more complex. Because of the complexity of the problems, WCF is designed to solve these problems, and WCF is a very complex technology. In order to see WCF performance, I divided the main features into 10 categories: independent version control, asynchronous forward-only messaging, platform unity, security, reliability, transaction support, interoperability, performance, scalability, and configuration.

Enable WCF performance counters

You can enable WCF performance counters through the app.config profile of the WCF service, as follows:

System.serviceModel > configuration >

You can set the performanceCounters property to enable specific types of performance counters. Valid values are

◆ All: enables all category counters (ServiceModelService, ServiceModelEndpoint, and ServiceModelOperation).

◆ ServiceOnly: only ServiceModelService category counters are enabled.

◆ Off: disable ServiceModel

◆ performance counters. This is the default value.

If you want to enable all WCF performance counters, you can place the configuration settings in the Machine.config file. For more information about configuring enough memory for performance counters on your computer, see the section "increasing the memory size of performance counters" (possibly an English Web page). You can also enable performance counters in your code, as follows:

Using System.Configuration; using System.ServiceModel.Configuration; using System.ServiceModel.Diagnostics; Configuration config = ConfigurationManager.OpenExeConfiguration (ConfigurationUserLevel.None); ServiceModelSectionGroup sg = ServiceModelSectionGroup.GetSectionGroup (config); sg.Diagnostic.PerformanceCounters = PerformanceCounterScope.All; config.Save ()

View performance data

To view the data captured by the performance counter, you can use the performance Monitor (Perfmon.exe) that comes with Windows. Start the tool by going to start, clicking run and typing perfmon.exe in the dialog box.

At this point, I believe you have a deeper understanding of "how to enable WCF performance counters". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report