我这样的简单对象:
的pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
</dependencies>
<!-- Package as an executable jar -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
这样的课程:
@RestController
@SpringBootApplication
public class Example {
@RequestMapping("/")
String home() {
return "Hello World!__";
}
public static void main(String[] args) throws Exception {
SpringApplication.run(Example.class, args);
}
}
执行命令:
/home/gdct/jdk1.8.0_152/bin/java -server -Xms1g -Xmx1g -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=256m -jar /home/gdct/abc/aembedjar.jar --server.port=9998
起初,TPS为3600,但几分钟后,TPS为1500.(慢下来)
请帮帮我,如何保持TPS是3500(或其他数字)左右???
注意:我测试了一个webservice api,它可以保留tps。