用于消耗 CPU 的 Windows 实用程序
我正在寻找一个 Windows 实用程序来以指定的百分比消耗 CPU,以便我可以在处理器资源受限的条件下测试我的应用程序。
我用谷歌搜索了一下,看到了对 CPUGRAB.exe 的引用,但找不到下载位置。
I'm looking for a windows utility to consume CPU at a specified percentage so that I can test my app under conditions of restricted processor resources.
I googled around and saw a reference to CPUGRAB.exe, but can't find a download location.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我相信您需要 CPU 速度调节器。与其他软件不同,它是免费软件:
http://www .softpedia.com/get/Tweak/System-Tweak/CPU-Speed-Adjuster.shtml
I beleive you need CPU Speed Adjuster. It is freeware unlike some others:
http://www.softpedia.com/get/Tweak/System-Tweak/CPU-Speed-Adjuster.shtml
在我的 Windows XP 笔记本电脑上,编译
bogdown.c
:w/o 任何优化,然后启动两个实例,可以最大限度地利用两个内核,并使启动任何程序或在文本框中输入内容变得很繁琐。
如果您想让操作系统更难从
bogdown.exe
中夺走时间片,您可以在任务管理器中提高进程的优先级,但要注意,您的系统可能会变得非常无响应。如果您想模拟有限的内存,请在
bogdown.exe
中使用calloc
(不是malloc
)一或两 GB 的内存。另一种选择是在测试应用程序时至少使用几个对视频进行编码的程序。
On my Windows XP laptop, compiling
bogdown.c
:w/o any optimizations and then starting two instances uses utilizes both cores to the max and makes starting any program or typing into the textbox on SO a chore.
If you want to make it harder for the OS to take away time slices from
bogdown.exe
, you can increase the priorities of the processes in Task Manager, but beware, your system may become very unresponsive.If you want to simulate limited memory,
calloc
(notmalloc
) a gigabyte or two of memory inbogdown.exe
.Another alternative is to have at least a couple of programs encoding video while you test your app.
我用 C# 编写了 CPUGrab.exe 的开源 (MIT) 替代品。这是因为我不愿意依赖(有时)声称拥有“cpugrab.zip”的可疑下载网站。 SimCopter 在我的 Win98 VM 上似乎工作得很好。 :)
该工具可以在这里找到:CPUGrab.NET
I wrote an Open Source (MIT) replacement for CPUGrab.exe in C#. This came about due to my reluctance to rely on (sometimes) shady download sites purporting to have 'cpugrab.zip'. It seems to work pretty well for SimCopter on my Win98 VM. :)
The tool can be found here: CPUGrab.NET
谷歌搜索 cpugrab。到处都有
cpugrab.zip
和cpugrab.rar
文件(Rapidshare、badongo 等)。它们可能合法,也可能不合法,我无法对此发表评论。Google for just cpugrab. There are
cpugrab.zip
andcpugrab.rar
files all over the place (rapidshare, badongo, etc). They may or may not be legal, I can't comment on that.Prime95
Prime95
Max CPU 会做一些你想做的事情,但是没有百分比粒度。
Max CPU will do some of what you want but doesn't have the percentage granularity.