Skip to content

Commit 2dab743

Browse files
committed
更新cpu数量测试
1 parent ff483eb commit 2dab743

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

test/test_cpus.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python
2+
# encoding: utf-8
3+
4+
"""
5+
@author: zhanghe
6+
@software: PyCharm
7+
@file: test_cpus.py
8+
@time: 2017/6/15 下午11:29
9+
"""
10+
11+
12+
import multiprocessing
13+
14+
bind = "127.0.0.1:8000"
15+
16+
workers = multiprocessing.cpu_count() * 2 + 1
17+
18+
19+
if __name__ == '__main__':
20+
print workers

0 commit comments

Comments
 (0)