从命令行重置性能计数器
我想从命令行执行命令,将给定的性能计数器重置为 0。
我可以编写一个简单的“3”行控制台应用程序来执行此操作,但想知道 VS 或 Windows 或 Windows SDK 是否已附带此类实用程序。我在 typeperf 或 logman 中都没有找到这样的选项。
语境: Windows 7 x64(具有管理员访问权限)
背景:
我使用性能计数器来调试/开发/压力测试 Web 服务。 Web 服务每次被命中时都会增加性能计数器。
因此,场景是访问 Web 服务 10000 次并验证没有消息丢失(我测试了 MSMQ + 乱序处理 + 持久性 + Windows Workflow Service)
I want to execute a command from command line to reset given performance counter to 0.
I could write a simple "3" lines console app to do that, but wondering if VS or Windows or Windows SDK already comes with such utility. I did not find such option in either typeperf or logman.
Context:
Windows 7 x64 (with Admin access)
Background:
I use a performance counter to debug/develop/stress-test a web service. Web service increments a performance counter every time it is hit.
So the scenario is to hit web service 10000 times and verify no messages have been lost (I test MSMQ + out-of-order processing + persistence + Windows Workflow Service)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我等待更好的答案时,这里有一个完整的“rstpc.exe”实用程序,用于重置性能计数器(NumberOfItems32 类型):
While I'm waiting for a better answer, here is a complete "rstpc.exe" utility to reset performance counter (of NumberOfItems32 type):