测试工具

更新时间:2025-03-06 10:02:06

本文介绍MSE Nacos性能测试工具Nacos-Bench及参数设置。

Nacos-Bench

Nacos-Bench是一款开源的,用于压测Nacos核心接口性能的工具,具体参数说明和使用示例如下:

参数说明

参数

说明

默认值

参数

说明

默认值

--configContentLength

配置内容长度

128字节

--configCount

配置个数

1000

--instanceCountPerService

每个服务注册的服务提供者数

3

--nacosClientCount

每个进程模拟的nacos client

1000

--nacosServerAddr

nacos服务端地址

127.0.0.1

--namingMetadataLength

服务提供者metadata数据大小

128字节

--perfApi

需要压测的接口,可选值为: namingReg、namingQuery、namingSubscribe、configPub、configGet

namingReg

--perfMode

压测模式,可选为:naming、config

naming

--perfTime

压测时间,单位为秒

600

--perfTps

压测TPS/QPS

500

--serviceCount

模拟注册服务名数量

15000

使用示例

服务注册
服务查询
配置发布
配置查询
./nacos-bench --nacosServerAddr=127.0.0.1 --perfMode=naming --perfApi=namingReg --perfTps=50 --perfTime=900 --nacosClientCount=100 --serviceCount=10000 --namingMetadataLength=64
./nacos-bench --nacosServerAddr=127.0.0.1 --perfMode=naming --perfApi=namingQuery --perfTps=50 --perfTime=900 --nacosClientCount=100 --serviceCount=10000 --namingMetadataLength=64
./nacos-bench --nacosServerAddr=127.0.0.1 --perfMode=config --perfApi=configPub --perfTps=5 --perfTime=900 --nacosClientCount=100 --configContentLength=64 --configCount=500
./nacos-bench --nacosServerAddr=127.0.0.1 --perfMode=config --perfApi=configGet --perfTps=100 --perfTime=900 --nacosClientCount=100 --configContentLength=64 --configCount=500
  • 本页导读 (1)
  • Nacos-Bench
  • 参数说明
  • 使用示例
AI助理

点击开启售前

在线咨询服务

你好,我是AI助理

可以解答问题、推荐解决方案等