用于消耗 CPU 的 Windows 实用程序

发布于 2024-08-09 10:34:45 字数 117 浏览 4 评论 0原文

我正在寻找一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

一刻暧昧 2024-08-16 10:34:46

我相信您需要 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

风情万种。 2024-08-16 10:34:46

在我的 Windows XP 笔记本电脑上,编译 bogdown.c:

int main(void) {
    int i;
    while ( 1 ) ++i;
    return 0;
}

w/o 任何优化,然后启动两个实例,可以最大限度地利用两个内核,并使启动任何程序或在文本框中输入内容变得很繁琐。

如果您想让操作系统更难从 bogdown.exe 中夺走时间片,您可以在任务管理器中提高进程的优先级,但要注意,您的系统可能会变得非常无响应。

如果您想模拟有限的内存,请在 bogdown.exe 中使用 calloc(不是 malloc)一或两 GB 的内存。

另一种选择是在测试应用程序时至少使用几个对视频进行编码的程序。

On my Windows XP laptop, compiling bogdown.c:

int main(void) {
    int i;
    while ( 1 ) ++i;
    return 0;
}

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 (not malloc) a gigabyte or two of memory in bogdown.exe.

Another alternative is to have at least a couple of programs encoding video while you test your app.

扭转时空 2024-08-16 10:34:46

我用 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

失退 2024-08-16 10:34:45

谷歌搜索 cpugrab。到处都有 cpugrab.zipcpugrab.rar 文件(Rapidshare、badongo 等)。它们可能合法,也可能不合法,我无法对此发表评论。

Google for just cpugrab. There are cpugrab.zip and cpugrab.rar files all over the place (rapidshare, badongo, etc). They may or may not be legal, I can't comment on that.

2024-08-16 10:34:45

Max CPU 会做一些你想做的事情,但是没有百分比粒度。

Max CPU will do some of what you want but doesn't have the percentage granularity.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文