[英]how to parallel test in ncrunch
I have a set of test methods as below: 我有一组测试方法,如下所示:
[TestMethod]
public void test1() { System.Threading.Thred.Sleep(10000); }
[TestMethod]
public void test2() { System.Threading.Thred.Sleep(10000); }
[TestMethod]
public void test3() { System.Threading.Thred.Sleep(10000); }
[TestMethod]
public void test4() { System.Threading.Thred.Sleep(10000); }
I would expect the tests to take 10 seconds to complete all the tests. 我希望测试需要10秒钟才能完成所有测试。
However it takes 20 seconds, not 10 sec and not 40 sec. 但是,这需要20秒,而不是10秒和40秒。
Can anyone tell me why this happens? 谁能告诉我为什么会这样?
Does ncrunch have any config files or settings menu. ncrunch是否有任何配置文件或设置菜单。
I read https://www.ncrunch.net/documentation/concepts_parallel-execution but can not find any options. 我阅读了https://www.ncrunch.net/documentation/concepts_parallel-execution,但是找不到任何选项。
nCrunch by default (configurable) gets half of your cpu cores. 默认情况下(可配置),nCrunch获得一半的CPU内核。 I suppose you got 4 cores and end up with two cores for nCrunch, which gives you these numbers as expected.
我想您有4个内核,最后有两个nCrunch内核,这可以按预期提供这些数字。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.