Go to file
JianweiWang 80ddc1d7e7 delete binary file 2025-03-18 16:09:10 +08:00
cmd/main init project 2025-03-18 15:50:06 +08:00
internal init project 2025-03-18 15:50:06 +08:00
.gitignore Initial commit 2025-02-25 10:29:52 +08:00
Dockerfile delete debug tools 2025-03-18 16:07:06 +08:00
LICENSE Initial commit 2025-02-25 10:29:52 +08:00
README.md init project 2025-03-18 15:50:06 +08:00
README_cn.md init project 2025-03-18 15:50:06 +08:00
go.mod init project 2025-03-18 15:50:06 +08:00
go.sum init project 2025-03-18 15:50:06 +08:00

README.md

Introduction

This project provides a performance testing tool for Nacos core interfaces. It supports performance stress testing for Nacos registry services (service registration/deregistration, service query) and Nacos configuration center interfaces (configuration publishing, configuration query).

Usage Instructions

Startup Parameters Description

Parameter Description Default Value
--configContentLength Configuration content length 128 bytes
--configCount Number of configurations 1000
--instanceCountPerService Number of service providers registered per service 3
--nacosClientCount Number of simulated Nacos clients per process 1000
--nacosServerAddr Nacos server address 127.0.0.1
--namingMetadataLength Metadata size of service providers 128 bytes
--perfApi Interface to be tested, options: namingReg, namingQuery, namingSubscribe, configPub, configGet namingReg
--perfMode Testing mode, options: naming, config naming
--perfTime Testing duration, in seconds 600
--perfTps Testing TPS/QPS 500
--serviceCount Number of simulated service names 15000

Usage Examples

  1. Service Registration
./nacos-bench --nacosServerAddr=127.0.0.1 --perfMode=naming --perfApi=namingReg --perfTps=50 --perfTime=900 --nacosClientCount=100 --serviceCount=10000 --namingMetadataLength=64  
  1. Service Query
./nacos-bench --nacosServerAddr=127.0.0.1 --perfMode=naming --perfApi=namingQuery --perfTps=50 --perfTime=900 --nacosClientCount=100 --serviceCount=10000 --namingMetadataLength=64  
  1. Configuration Publishing
./nacos-bench --nacosServerAddr=127.0.0.1 --perfMode=config --perfApi=configPub --perfTps=5 --perfTime=900 --nacosClientCount=100 --configContentLength=64 --configCount=500  
  1. Configuration Query
./nacos-bench --nacosServerAddr=127.0.0.1 --perfMode=config --perfApi=configGet --perfTps=100 --perfTime=900 --nacosClientCount=100 --configContentLength=64 --configCount=500