原由
最近抽取了项目部分功能,提供dubbo接口以供其他项目组使用,这里被别人依赖,就要负起责任啊,我们的dubbo服务能支撑多少并发,有多大吞吐量呢。
jmeter
很多人应该都比较熟悉了,就用它来告诉我们答案吧。
<!--jmeter依赖的jar包--> <dependency> <groupId>org.apache.jmeter</groupId> <artifactId>ApacheJMeter_core</artifactId> <version>3.2</version> <exclusions> <exclusion> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> </exclusion> <exclusion> <groupId>commons-math3</groupId> <artifactId>commons-math3</artifactId> </exclusion> <exclusion> <groupId>commons-pool2</groupId> <artifactId>commons-pool2</artifactId> </exclusion> </exclusions> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.jmeter/ApacheJMeter_java --> <dependency> <groupId>org.apache.jmeter</groupId> <artifactId>ApacheJMeter_java</artifactId> <version>3.2</version> <exclusions> <exclusion> <groupId>commons-math3</groupId> <artifactId>commons-math3</artifactId> </exclusion> <exclusion> <groupId>commons-pool2</groupId> <artifactId>commons-pool2</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.netease.kada.compose</groupId> <artifactId>kada-itemcenter-compose-api</artifactId> <version>${kada-compose}</version> </dependency>
<dependency> <groupId>com.alibaba</groupId> <artifactId>dubbok</artifactId> <version>3.0.2.1</version> </dependency> <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-framework</artifactId> <version>2.12.0</version> <exclusions> <exclusion> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-recipes</artifactId> <version>2.12.0</version> </dependency> <!-- zk --> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.4.6</version> <exclusions> <!-- Exclude Commons Logging in favor of SLF4j --> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.github.sgroschupf</groupId> <artifactId>zkclient</artifactId> <version>0.1</version> <exclusions> <!-- Exclude Commons Logging in favor of SLF4j --> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> </exclusions> </dependency> </dependencies>
使用jmeter进行测试
项目启动成功后可以开心的进行测试了
本文来自网易实践者社区,经作者张昌路授权发布。