Age | Commit message (Collapse) | Author |
|
|
|
The pgbench directory and other utilities have moved around. Compensate
by testing if the directory exists and try to install that component.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The idea is that one results document represents a test of one
particular commit. Then it contains the results of all the tests run
against that commit. I think it makes more sense to restructure the
pgbench results to be like:
{
"pgbench": {
"ro": {
"results at a scale factor": {
"number of clients": {
"std": 4389.727756305762,
"metric": 41390.590287,
"median": 43137.716637,
"results": [
{
... pgbench results of a test ...
}
...
]
},
....
},
"rw": {
... read write test results ...
},
... other tests results
}
|
|
Make the default settings what we want to be tested. The idea is to
minimize setup on the clients.
|
|
|
|
Between the benchmark and collector modules, it's not clear who might
have created the output directory first. Leave a warning in the
benchmark modules for now, otherwise don't let it prevent the tests from
running.
|
|
This is for ease of automated testing. Using git:// can require manual
confirmation about updating the ssh known hosts file.
|
|
The memory calculations for pgbench will need to be platform specific.
Also the system data collection may have to be platform specific. Thus
far, just added conditions so that things will run on FreeBSD now.
|
|
Set the default directories in the client settings.py file to use /tmp.
This will make it easier to automate testing by reducing the number of
settings to configure.
|
|
The output directory is used for the cwd when executing pgbench so that
the output files are saved in the results directory.
|
|
The location of sysctl may change depending on the distribution. Try to
add all possible paths to the environment.
|
|
|
|
|
|
The idea is to keep things simple by having a directory of results per
test, and to have each directory with a consistently named results
files.
|
|
It has some things that are not in the sysctl information. Like
hardware architecture.
|
|
Keep the json results document small by saving log information
externally. This include:
* postgres log
* pgbench output
* sar output
|
|
The env parameter to call() was clearing the PATH environment to only
have the postgres binary install path. Modify only the PATH
environment.
|
|
Prior to 9.5, pgbench was in contrib.
|
|
This allows testing of older versions of postgres. Otherwise only
versions of postgres supporting ALTER SYSTEM (9.4+) will work with this
client.
|
|
|
|
|
|
Also check to make sure files exist before trying to collect them.
|
|
|
|
|
|
|
|
|
|
Originally the results were collected into a JSON format, which is
not very convenient when running ad-hoc benchmarks.
|
|
The code is not fully compatible with Python 3.x (although it should
not be a big deal to make that happen).
|
|
Otherwise the messages may get buffered for a quite long time, which
is annoying, particularly in multi-process system.
|
|
When the workers produce results and return them through a queue, we need
to first drain the queue and then wait for the thread to join(). Otherwise
it seems to lock up - the join() call with wait as long as there are items
in the queue. This also happens because we do both things (reading from
queue and waiting for the thread) in the same thread.
|
|
In case of connection failure (e.g. a backend getting terminated by
OOM killer and taking down the whole server), the workers failed
with an exception without putting a result into the queue, leading
to hangs.
This fixes that by making the workers resilient to connection issues
by catching the exceptions and terminating nicely. Also, we retry
connection several times, to continue with benchmarking even after
OOM hits us unexpectedly, etc.
|
|
Before doing any heavy-lifting, check existence of directories,
binaries and some other sanity checks.
|
|
When refreshing a reporitory clone, running 'git pull $dir' does
not do the trick - it assumes the CWD is the clone, and imports
data from repository at $dir. So we need to set CWD properly and
do just 'git pull'.
Also, prefix class members with 'self'.
|