Dreamhunter Blog

你指尖跃动的电光,是我此生不变的信仰

vuePress-theme-reco Dreamhunter    2019 - 2022
Dreamhunter Blog

Choose mode

  • dark
  • auto
  • light
首页
分类
  • algorithm
  • database
  • devops
  • docker
  • front
  • git
  • hackintosh
  • http
  • java
  • linux
  • odoo
  • nginx
  • macos
  • mq
  • other
  • python
  • redis
  • router
标签
归档
GitHub (opens new window)
author-avatar

Dreamhunter

119

文章

40

标签

首页
分类
  • algorithm
  • database
  • devops
  • docker
  • front
  • git
  • hackintosh
  • http
  • java
  • linux
  • odoo
  • nginx
  • macos
  • mq
  • other
  • python
  • redis
  • router
标签
归档
GitHub (opens new window)
  • Python

    • Python locals()
    • Python sorted()
    • Python3 mro _class_
    • asyncio run in executor
    • 互斥锁实现一个死锁
    • locust 压测
    • Normal Errors
    • python 位运算
    • python类中的self参数和cls参数
    • Python Dynamic Import
    • Python metaclass
    • timeit 测量小代码片段的执行时间
    • What’s New In Python 3.8

locust 压测

vuePress-theme-reco Dreamhunter    2019 - 2022

locust 压测

Dreamhunter 2022/7/11 python

# 官网

locust (opens new window)

# 示例

from locust import HttpUser, task


class Demo(HttpUser):
    @task
    def demo(self):
        self.client.get("/")

# 运行

locust -f locustfile.py

打开 http://localhost:8089/ (opens new window) 即可开始使用

互斥锁实现一个死锁 Normal Errors

  • 官网
  • 示例
  • 运行