nancy prepare-workload
Created by: NikolayS
In this PR:
1) New command, nancy prepare-workload!
Heavily based on @myyorick's work, uses gawk with FPAT (see https://www.gnu.org/software/gawk/manual/html_node/Splitting-By-Content.html and many more tricks).
nancy prepare-workload
tool prepares "real workload" file based on PostgreSQL CSV logs.
Example:
nancy prepare-workload --db-name my_database_name --output ./sample.replay ./sample.csv
-- it will take CSV-log ./sample.csv
and produce replay-file ./sample.replay
, which can be used in --workload-real
of nancy run
command.
2) CI tests
- check that replay file can be created from a simple CSV log file
- check that replay file (prepared in advance) can be used by
nancy run --run-on localhost --workload-real ...
nancy run
options were renamed
3) Some -
--workload-full-path
->--workload-real
-
--workload-replay-speed
->--workload-real-replay-speed
-
--workload-basis-path
->--workload-basis
Limitations:
- Text logs are not yet supported.
- Supported Postgres versions: 9.6+ (not yet tested with 9.5 and older)
- the tool requires: gawk, pgreplay, bc
- not yet tested on Mac OS, only on Linux
TODO
(postponed, will be done in separate PRs)
-
s3://
|file://
for files -
help -
README -
wording -
test for nancy run ... --workload-real=...
-
use docker container and don't require gawk, pgreplay, bc? -
use close(...)
in awk, see https://www.gnu.org/software/gawk/manual/html_node/Close-Files-And-Pipes.html -
"start timestamp" and "duration" options