模拟java开发的高CPU负载 [英] simulate high cpu load for java development
问题描述
有没有办法模拟高CPU负载/限制可用的CPU为Java应用程序?当然,我可以编写一个脚本实际上使我的CPU与各种任务重载,但我宁愿保持我的操作系统的其余运行顺利,不要过热我的机器,如果可能的话,有没有
我目前正在使用Eclipse Kepler作为我的IDE,但是如果另一个人可以自己做这个,那么他愿意切换。
编辑:我在Windows上工作,忘了澄清了:)
使用 BES 节省您的CPU用于该特定的配置。
我会高度建议您限制内存使用量达到完全相同的目的。
请参阅这篇文章,以便在执行编译文件时传递最大内存使用量。
I'm developing a Java app and would like to see how it runs on slower/overloaded machines. (I suspect there may be some thread unsafe issues, etc. that get ignored because my machine just compiles it quickly enough.
Is there a way to simulate high CPU load/limit available CPU for the Java app? Of course, I could write a script to actually overload my CPU with various tasks, but I would prefer to keep the rest of my OS running smoothly and not overheat my machine, if possible. Is there an easy/known way to do this?
I am currently using Eclipse Kepler as my IDE, but would be willing to switch if another could do this natively.
EDIT: I'm working in Windows, forgot to clarify. :)
Use BES to throttle your CPU for that specific prcocess.
I would highly recommend you limiting your memory usage for the exact same purpose.
See this post for a very easy way to pass in a maximum memory usage when you execute the compiled file.
这篇关于模拟java开发的高CPU负载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!