mirror of
https://github.com/frappe/bench.git
synced 2025-01-08 00:04:38 +00:00
removed psutil as a requirement
This commit is contained in:
parent
c1a8be4791
commit
e6defad003
@ -215,7 +215,6 @@ def get_error_pages():
|
|||||||
|
|
||||||
def get_limit_conn_shared_memory():
|
def get_limit_conn_shared_memory():
|
||||||
"""Allocate 2 percent of total virtual memory as shared memory for nginx limit_conn_zone"""
|
"""Allocate 2 percent of total virtual memory as shared memory for nginx limit_conn_zone"""
|
||||||
import psutil
|
total_vm = (os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')) / (1024 * 1024) # in MB
|
||||||
total_vm = (psutil.virtual_memory().total) / (1024 * 1024) # in MB
|
|
||||||
|
|
||||||
return int(0.02 * total_vm)
|
return int(0.02 * total_vm)
|
||||||
|
@ -67,9 +67,7 @@ def get_redis_version():
|
|||||||
return float('{major}.{minor}'.format(major=version.major, minor=version.minor))
|
return float('{major}.{minor}'.format(major=version.major, minor=version.minor))
|
||||||
|
|
||||||
def get_max_redis_memory():
|
def get_max_redis_memory():
|
||||||
import psutil
|
total_virtual_mem = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')/(pow(1024, 2))
|
||||||
|
|
||||||
total_virtual_mem = psutil.virtual_memory().total/(pow(1024, 2))
|
|
||||||
max_memory = int(total_virtual_mem * 0.05) # Max memory for redis is 5% of virtual memory
|
max_memory = int(total_virtual_mem * 0.05) # Max memory for redis is 5% of virtual memory
|
||||||
|
|
||||||
if max_memory < 50:
|
if max_memory < 50:
|
||||||
|
@ -3,7 +3,6 @@ jinja2
|
|||||||
virtualenv
|
virtualenv
|
||||||
requests
|
requests
|
||||||
honcho
|
honcho
|
||||||
psutil
|
|
||||||
python-crontab
|
python-crontab
|
||||||
semantic_version
|
semantic_version
|
||||||
GitPython==0.3.2.1
|
GitPython==0.3.2.1
|
||||||
|
Loading…
Reference in New Issue
Block a user