Commit 31fe231f authored by Kirill Smelkov's avatar Kirill Smelkov

neotest: Draft software-release to run NEO/go & friends tests/benchmarks under webrunner

We provide neotest SR which builds current NEO/go together with the
tools which are needed to run the benchmarks. Go part uses
just-introduced in previous commit gowork infrastructure.

The SR does not yet provide automated service to run the tests
automatically periodically and to upload the results to ERP5 (all marked
as TODO).

However with present state it provides all the infrastructure for people
to try to run NEO tests in their webrunner: a `neotest` program is
installed in buildout top-level bin/ . One should use it to run the
tests.

For example:

	slapuser14@vifibcloud-onlinenet-hosting-004:~/srv/runner/t$ ../software/4db21ec948dce895b38ba93c1def3ab1/bin/neotest
	Neotest is a tool to functionally test and benchmark NEO.

	Usage:

	        neotest command [arguments]

	The commands are:

	        bench-local     run benchmarks when client and server are both on the same localhost
	        bench-cluster   run benchmarks when server is local and client is on another node

	        run-client      run client benchmarks against separate server
	        bench-disk      benchmark local disk (already part of bench-{local,cluster})
	        bench-cpu       benchmark local cpu  (already part of bench-{local,cluster})

	        deploy          deploy NEO & needed software for tests to remote host
	        deploy-local    deploy NEO & needed software for tests locally

	        info            print information about a node
	        info-local      print information about local deployment

	Additional utility commands:

	        cpustat         run a command and print CPU-related statistics

	slapuser14@vifibcloud-onlinenet-hosting-004:~/srv/runner/t$ ../software/4db21ec948dce895b38ba93c1def3ab1/bin/neotest info-local
	# Thu, 19 Oct 2017 18:13:35 +0300
	# slapuser14@sd-112617.dedibox.fr (2001:67c:1254:e:8c::1 (+ 20·ipv6) 163.172.70.8 (+ 20·ipv4))
	# Linux vifibcloud-onlinenet-hosting-004 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
	# cpu: Intel(R) Xeon(R) CPU D-1531 @ 2.20GHz
	# cpu[0-11]: freq: intel_pstate/powersave [.80GHz - 2.70GHz]
	# cpu[0-11]: idle: acpi_idle/menu: POLL(0μs) C1(1μs) C2(41μs)
	# cpu: WARNING: frequency not fixed - benchmark timings won't be stable
	# cpu: WARNING: C-state exit-latency is max 41μs - up to that can add to networked and IPC request-reply latency
	# md1 (raid0) -> sda3  sdb3
	# sda: SAMSUNG MZ7LN256  rev 100Q 238.5G
	# sdb: SAMSUNG MZ7LN256  rev 100Q 238.5G
	# eth0: Intel Corporation I350 Gigabit Network Connection rev 01
	# eth0: features: rx tx sg tso !ufo gso gro !lro rxvlan txvlan !ntuple rxhash ...
	# eth0: coalesce: rxc: 3μs/0f/0μs-irq/0f-irq,  txc: 0μs/0f/0μs-irq/0f-irq
	# eth0: up, speed=1000, mtu=1500, txqlen=1000, !gro_flush_timeout
	# eth1: Intel Corporation I350 Gigabit Network Connection rev 01
	# eth1: features: rx tx sg tso !ufo gso gro !lro rxvlan txvlan !ntuple rxhash ...
	# eth1: coalesce: rxc: 3μs/0f/0μs-irq/0f-irq,  txc: 0μs/0f/0μs-irq/0f-irq
	# eth1: down, speed=?, mtu=1500, txqlen=1000, !gro_flush_timeout
	# Python 2.7.14
	# go version go1.9.1 linux/amd64
	# sqlite 3.19.0 (py mod 2.6.0)
	# mysqld  Ver 10.1.28-MariaDB for Linux on x86_64 (MariaDB Server)
	# neo             : v1.8-1326-g4d0cd894
	# zodb            : 4.4.5
	# zeo             : 4.3.1
	# mysqlclient     : 1.3.12
	# wendelin.core   : v0.11-4-g38fbc83

slapuser14@vifibcloud-onlinenet-hosting-004:~/srv/runner/t$ time ../software/4db21ec948dce895b38ba93c1def3ab1/bin/neotest bench-local 2>&1 |tee 1.txt
...
*** FileStorage
Benchmarkvifibcloud-onlinenet-hosting-004/fs1/zhash.py 1 24.4 µs/object # crc32:1552c530  oid=0..2127  nread=8534126  t=0.052s  # POLL·0 C1·49 C2·853
Benchmarkvifibcloud-onlinenet-hosting-004/fs1/zhash.py 1 24.6 µs/object # crc32:1552c530  oid=0..2127  nread=8534126  t=0.052s  # POLL·0 C1·63 C2·894
Benchmarkvifibcloud-onlinenet-hosting-004/fs1/zhash.py 1 20.7 µs/object # crc32:1552c530  oid=0..2127  nread=8534126  t=0.044s  # POLL·0 C1·39 C2·803
Benchmarkvifibcloud-onlinenet-hosting-004/fs1/zhash.py 1 20.8 µs/object # crc32:1552c530  oid=0..2127  nread=8534126  t=0.044s  # POLL·1 C1·18 C2·629
Benchmarkvifibcloud-onlinenet-hosting-004/fs1/zhash.py 1 20.7 µs/object # crc32:1552c530  oid=0..2127  nread=8534126  t=0.044s  # POLL·0 C1·12 C2·669
...
parent 88f70453
# Code generated by gowork-snapshot; DO NOT EDIT.
# list of go git repositories to fetch
[gowork.goinstall]
depends_gitfetch =
${go_github.com_cznic_strutil:recipe}
${go_github.com_golang_glog:recipe}
${go_github.com_kisielk_og-rek:recipe}
${go_github.com_kylelemons_godebug:recipe}
${go_github.com_pkg_errors:recipe}
${go_github.com_pkg_profile:recipe}
${go_github.com_someonegg_gocontainer:recipe}
${go_golang.org_x_net:recipe}
${go_golang.org_x_perf:recipe}
${go_golang.org_x_sync:recipe}
${go_golang.org_x_tools:recipe}
${go_lab.nexedi.com_kirr_go123:recipe}
${go_lab.nexedi.com_kirr_neo:recipe}
[go_github.com_cznic_strutil]
<= go-git-package
go.importpath = github.com/cznic/strutil
repository = https://github.com/cznic/strutil
revision = 529a34b1c1
[go_github.com_golang_glog]
<= go-git-package
go.importpath = github.com/golang/glog
repository = https://github.com/golang/glog
revision = 23def4e6c1
[go_github.com_kisielk_og-rek]
<= go-git-package
go.importpath = github.com/kisielk/og-rek
repository = https://github.com/kisielk/og-rek
revision = dd41cde712
[go_github.com_kylelemons_godebug]
<= go-git-package
go.importpath = github.com/kylelemons/godebug
repository = https://github.com/kylelemons/godebug
revision = d65d576e93
[go_github.com_pkg_errors]
<= go-git-package
go.importpath = github.com/pkg/errors
repository = https://github.com/pkg/errors
revision = v0.8.0-6-g2b3a18b5f0
[go_github.com_pkg_profile]
<= go-git-package
go.importpath = github.com/pkg/profile
repository = https://github.com/pkg/profile
revision = v1.2.1-0-g5b67d42886
[go_github.com_someonegg_gocontainer]
<= go-git-package
go.importpath = github.com/someonegg/gocontainer
repository = https://github.com/someonegg/gocontainer
revision = fc2c7e84b5
[go_golang.org_x_net]
<= go-git-package
go.importpath = golang.org/x/net
repository = https://go.googlesource.com/net
revision = 1087133bc4
[go_golang.org_x_perf]
<= go-git-package
go.importpath = golang.org/x/perf
repository = https://go.googlesource.com/perf
revision = 4469e6ce8c
[go_golang.org_x_sync]
<= go-git-package
go.importpath = golang.org/x/sync
repository = https://go.googlesource.com/sync
revision = 8e0aa688b6
[go_golang.org_x_tools]
<= go-git-package
go.importpath = golang.org/x/tools
repository = https://go.googlesource.com/tools
revision = 9bd2f44268
[go_lab.nexedi.com_kirr_go123]
<= go-git-package
go.importpath = lab.nexedi.com/kirr/go123
repository = https://lab.nexedi.com/kirr/go123.git
revision = 2578d58311
[go_lab.nexedi.com_kirr_neo]
<= go-git-package
go.importpath = lab.nexedi.com/kirr/neo
repository = https://lab.nexedi.com/kirr/neo.git
revision = v1.8-1326-g4d0cd89484
# TODO instance which runs this test periodically automatically and ingests results to ERP5
# env.sh for putting everything needed to run neotest on path
. ${gowork:env.sh}
PATH="${ethtool:location}/sbin:$PATH"
PATH="${ioping:location}/bin:$PATH"
PATH="${lmbench:location}/bin:$PATH"
PATH="${mariadb:location}/bin:$PATH"
PATH="${mariadb:location}/scripts:$PATH"
PATH="${python2.7:location}/bin:$PATH"
# add all eggs and develop-eggs to py path
#
# XXX better leverage something like zc.recipe.egg to generate eggs path buildout way
# XXX see e.g. https://lab.nexedi.com/nexedi/slapos/merge_requests/242#note_49644 for why
# TODO(kirr) try doing so
PYTHONPATH=${buildout:develop-eggs-directory}:$PYTHONPATH # for .egg-link to be found by setuptools
for egglink in ${buildout:develop-eggs-directory}/*.egg-link; do
PYTHONPATH=`cat $egglink |head -1`:$PYTHONPATH
done
for egg in ${buildout:develop-eggs-directory}/*.egg ${buildout:eggs-directory}/*.egg; do
export PYTHONPATH=$egg:$PYTHONPATH
done
export PATH
export PYTHONPATH
export PS1="(neotest-`basename ${buildout:directory}`) $PS1"
#!/bin/bash -e
# neotest wraper so it could be run without any environment preset
. ${buildout:directory}/neotest-env.sh
exec ${gowork:src}/lab.nexedi.com/kirr/neo/go/neo/t/neotest "$@"
# neotest SR with main components taken from latest git versions
[buildout]
extends = software.cfg
[go_lab.nexedi.com_kirr_go123]
branch = master
revision=
[go_lab.nexedi.com_kirr_neo]
branch = t
revision=
[lmbench-repository]
branch = x/kirr
revision=
[ioping-repository]
branch = x/hist
revision=
# NEO test software-release
#
# This software-release prepares environment so that neotest NEO
# testing/benchmarking can be run in a SlapOS WebRunner.
[buildout]
extends =
../../stack/slapos.cfg
../neoppod/software-common.cfg
../../component/golang/buildout.cfg
gowork.cfg
../../component/wendelin.core/buildout.cfg
../../component/ethtool/buildout.cfg
../../component/ioping/buildout.cfg
../../component/lmbench/buildout.cfg
parts =
gowork
lmbench
ioping
ethtool
neoppod-develop
neoppod
wendelin.core-dev
eggs
neotest-env.sh
neotest
# for instance
slapos-deps-eggs
slapos-cookbook
# instance.cfg
# go packages to install (+ automatically their dependencies)
[gowork]
install =
lab.nexedi.com/kirr/neo/go/... \
github.com/pkg/profile \
golang.org/x/perf/cmd/benchstat
# dev-install neo from go checkout
[neoppod-develop]
setup = ${go_lab.nexedi.com_kirr_neo:location}
# neotest-env.sh + neotest wrapper
[buildout-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:_buildout_section_name_}.in
output = ${buildout:directory}/${:_buildout_section_name_}
[neotest-env.sh]
<= buildout-template
md5sum = 6e2203c7a86e8a3e8e56b8086115f5d4
[neotest]
<= buildout-template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
md5sum = fb3b4109128c1db1739ef5bb6abd1d94
# instance (TODO)
[instance.cfg]
<= buildout-template
md5sum = 410e1b2d72829824b28cc0299adb472e
# eggs:
[eggs]
recipe = zc.recipe.egg
eggs =
# wendelin.core still requires ZODB3 but having ZODB4 or 5 installed satisfies latest ZODB3
ZODB3
# also for wc
numpy
# to install not only wendelin.core modules but also scripts
wendelin.core
# for ZEO scripts (runzeo)
ZEO
# wendelin.core: latest not yet released
[wendelin.core-repository]
revision= v0.11-4-g38fbc83ceb
# ping eggs versions
[versions]
pyasn1 = 0.3.7
ZODB3 = 3.11.0
numpy = 1.13.3
zope.testing = 4.6.2
# Required by:
# ZEO==4.3.1
# ZODB==4.4.5
# zodburi==2.3.0
ZConfig = 3.2.0
# Required by:
# ZEO==4.3.1
# ZODB==4.4.5
zc.lockfile = 1.2.1
# Required by:
# slapos.toolbox==0.73
erp5.util = 0.4.49
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment