如何创建CPU、磁盘和磁盘C# 的内存性能指标
我们需要一个由用 C# 编写的应用程序的诊断对话框生成的自定义性能指数。对于:
- CPU
- 磁盘
- 内存
这将给出当前机器能够处理的近似值。该值不必是准确的,它只是一个指示。
一种实用的方法是使用临时文件等执行应用程序执行的常见操作,但我们希望在不同的应用程序中使用该例程。
您能给我推荐用 C# 编写的函数或参考吗?
更新:应用程序运行在Windows服务器上,而且仍然有很多XP,所以Vista和7 性能指标不适合。
We need a custom performance index generated by a diagnostic dialog of our application written in C#. For:
- CPU
- Disk
- Memory
This will give an approximation of what the current machine will be able to handle. The value doesn't have to be accurate, it's just an indication.
One pragmatic method would be to do common operation the application do, with temporary files, and everything, but we want the routine to be used in different applications.
Could you please propose me functions or references written in C# ?
UPDATE: application run on windows servers and also still a lot of XP, so Vista & 7 Performance Index is not suitable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不是完整的答案,但对于 CPU 性能,您可以尝试用于科学和测试的 SciMark2 基准的 C# 端口数值计算,提供近似的 MFlop 性能。 此处包含一个版本 作为 Libjit 库的一部分,但还有其他端口。我读到有一个更现代的并行版本,但到目前为止无法找到它(如果有人知道,请告诉我们)。
Not a full answer, but for CPU performance you could try the C# port of the SciMark2 benchmark for scientific and numerical computing which gives approximate MFlop performance. There is a version included here as part of the Libjit library but there are other ports around. I have read that there is a more modern parallel version around, but have been unable to locate it so far (if anyone knows of one please let us know).