To allow user running custom scripts, not just the default read-write/read-only tests!
-
set up custom script root folder modify const
SCRIPTS_DIR
inclient/setting.py
to indicate custom script root path -
start service
python3 manage.py runserver
-
start client
python3 perffarm-client.py
-
the bgbench result and all the sql file under your
SCRIPTS_DIR
gonna automatly save topgperffarm-db
scripts.py
is the main class for collecting scripts , run cmd and generate upload json.
method | result | description |
---|---|---|
hasScript | Ture/False | if custom script dir exist and with sql file in it return true,or else return false |
run_custom_script | return run_cmd result | run bgbench cmd like "pgbench -f a.sql -f b.sql -f … dbname" |
getScriptListJson | json | perpare custome script information json |
- json part
we add a
customeScript
JsonObject to descrip custem scriptt result. if with no custom script situation,thecustomeScript
is a empty JsonObject.
- file part the customeScript sql files are also be uploaded to the server.
-
add
customeScript
and complete the related Django rest framwork -
add
customeScript
type intestCategory
table in the database.
add GUI for command line for environment setups.