mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 22:12:15 +00:00
26 lines
701 B
Python
26 lines
701 B
Python
from ssh_lib import SCRIPTS_DIR
|
|
from ssh_lib.utils import apt_get_install, exists, put
|
|
|
|
|
|
def c1000k(c):
|
|
if exists(c, 'c1000k-master'):
|
|
return
|
|
|
|
c.run('wget https://github.com/ideawu/c1000k/archive/master.zip -O tmp.zip')
|
|
c.run('unzip -o tmp.zip')
|
|
c.run('rm tmp.zip')
|
|
c.run('cd c1000k-master && make')
|
|
|
|
# usage
|
|
# ./server 7000
|
|
# ./client 127.0.0.1 7000
|
|
# make sure it runs till 1 million
|
|
|
|
|
|
def benchmark(c):
|
|
apt_get_install(c, 'wrk')
|
|
c.sudo('mkdir -p /data/ofm/benchmark')
|
|
put(c, f'{SCRIPTS_DIR}/http_host/benchmark/wrk_custom_list.lua', '/data/ofm/benchmark')
|
|
|
|
# wrk -c10 -d10s -t1 -s /data/ofm/benchmark/wrk_custom_list.lua http://localhost
|