Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 2.39 KB

海陆空小组report.md

File metadata and controls

66 lines (42 loc) · 2.39 KB

custom scripts

Project Description

To allow user running custom scripts, not just the default read-write/read-only tests!

图片 1

Getting Started

  1. set up custom script root folder modify const SCRIPTS_DIR in client/setting.py to indicate custom script root path

  2. put some custom sql files under SCRIPTS_DIR folder,

  3. start service python3 manage.py runserver

  4. start client python3 perffarm-client.py

  5. the bgbench result and all the sql file under your SCRIPTS_DIR gonna automatly save to pgperffarm-db

Implementation Details

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

upload

  • json part we add a customeScript JsonObject to descrip custem scriptt result. if with no custom script situation,the customeScript is a empty JsonObject.

-w635

  • file part the customeScript sql files are also be uploaded to the server.

server part

  1. add customeScript and complete the related Django rest framwork -w1164

  2. add customeScript type in testCategory table in the database.

  3. upload result in db(6 indicate is a customeScript type)

  4. script files are saved in db. -w973

Future work

add GUI for command line for environment setups.

PR summary

-w1440

-w1026 screencapture-github-chouchouyu-django-postgres-stack-commits-wsm-2020-03-04-21_59_12