ThingsBoard - 性能测试

233 阅读1分钟
1、  镜像下载启动

docker-compose up -d tb-perf-test

version: '3.8'

services:
  tb-perf-test:
    image: thingsboard/tb-ce-performance-test:latest
    container_name: tb-perf-test
    environment:
      # 内网地址 ifconfig查看
      - REST_URL=http://172.17.0.1:18080
      - MQTT_HOST=172.17.0.1
      # 多少个设备
      - DEVICE_END_IDX=30
      # 每秒钟产生多少个遥测数据
      - MESSAGES_PER_SECOND=30
      # 每秒产生报警数量
      - ALARMS_PER_SECOND=10
      # 持续时间86400 = 1 天
      - DURATION_IN_SECONDS=86400
      # 是否创建设备
      - DEVICE_CREATE_ON_START=true
      # MQTT地址
      - MQTT_HOST=localhost
      # MQTT端口
      - MQTT_PORT=11883
    network_mode: host
    restart: no
    # tdin_open: true 和 tty: true:等价于 -it,它们保持容器的交互性。
    stdin_open: true
    tty: true

image.png

image.png

image.png

image.png

image.png

2、  官方性能测试

文档地址:

www.ithingsboard.com/docs/refere…

最终推荐使用Cassandra +Kafka + Postgres

image.png

image.png

image.png

3、 视频讲解

t.bilibili.com/10188992878…