摘要: 一、概述性能监视,是Windows NT提供的一种系统功能。Windows NT一直以来总是集成了性能监视工具,它提供有关操作系统当前运行状况的信息,针对各种对象提供了数百个性能计数器。性能对象,就是被监视的对象,典型例子有Processor、Process、Memory、TCP/UDP/IP/ICMP、PhysicalDisk等。计数器通常提供操作系统、应用程序、服务、驱动程序等的性能相关信息,以此来分析系统瓶颈和对系统及应用程序性能进行诊断和调优。性能计数器机制让应用程序和操作系统组件可以向性能监视应用程序,比如性能监视器(Performance Monitor),报告一些与性能有关的统计 阅读全文
posted @ 2012-08-27 11:50 赤狐(zcm123) 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 一 PerformanceCounter 基本介绍1 简单介绍表示 Windows NT 性能计数器组件 命名空间:System.Diagnostics程序集:System(在 system.dll 中)2 构造函数(只介绍本文要用到的)PerformanceCounter (String, String, String) 功能:初始化 PerformanceCounter 类的新的只读实例,并将其与本地计算机上指定的系统性能计数器或自定义性能计数器及类别实例关联参数说明:public PerformanceCounter (string categoryName,string counter 阅读全文
posted @ 2012-08-27 11:48 赤狐(zcm123) 阅读(284) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { string myName = "CC"; GetFullInfo(myName,s => Console.WriteLine(s)); Console.ReadLine(); } static void GetFullInfo(string yourname, Action<string> action) { string firstStr = "Welcome to cnblogs "; action(firstStr + yourn 阅读全文
posted @ 2012-08-27 11:38 赤狐(zcm123) 阅读(6841) 评论(1) 推荐(1) 编辑