Code Monkey home page Code Monkey logo

colo's Introduction

说明

这是一个基于Python3+Locust+Vue3的性能测试平台,通过Postgresql+Grafana做监控大盘,追求简单化执行性能测试,平台化集成脚本管理、场景配置、压力配置、任务管理、监控报警等

(开发中)

  • 简单
  • 平台化
  • 易扩展

🎉️ 目前正在逐步更新,欢迎提Issues,有任何问题欢迎随时联系

项目架构

技术栈

前端:vue3+element-ui

后端:python django

中间件: mysql

性能测试引擎:locust,locust-plugins

监控系统:Grafana+postgressql(timescale)

架构图

系统简要架构图

部署

部署基础组件

1.部署Grafana+postgressql,推荐使用docker部署,项目下有docker-compose.yml文件,可参考部署

2.建好数据库/assets/timescale_schema.sql有脚本

3.部署Grafana,导入好监控指标

参考:locust_plugins https://github.com/SvenskaSpel/locust-plugins/tree/master/locust_plugins/dashboards

部署前端

node version >= 18

# 进入前端项目目录
cd ui-colo
# 安装前端依赖
npm install
# 运行前端服务
npm run dev
# 打包预发布环境
npm build:stage

# 打包正式环境
npm build:prod

部署后端

# 安装依赖
pip install -r requirements.txt
# 建colo需要的库表
##安装一个mysql库,具体用户名等信息在setting.py配置
# 运行一下2个命令,生成所需的表
python manage.py makemigrations api
python manage.py migrate
# 运行后端服务
python3 manage.py runserver 0.0.0.0:8000

功能展示

浏览器打开访问localhost:3333 首页Dashboard

脚本管理

脚本管理 脚本暂时还没规划好是保存在数据库还是在git上,TODO

测试计划

测试计划

测试记录

开始压测后,会在这里生成一个记录,可以停止和打开监控大盘

测试记录

监控大盘展示

生成唯一的testplan,交给grafana来聚合,展示

image.png

image.png

image.png

平台流程

手动运行locust

 locust --timescale --headless --override-plan-name 0108 --pghost=<machineip> --pgport=5432 --pgpassword=password --pguser=postgres
 #运行locust 输出到postgressql

🙏 致谢/Acknowledgments

TODO

  • 脚本上传管理 / git保存
  • 测试计划-分布式/单机运行模式
  • [ ]

colo's People

Contributors

wohui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.