Test case improvement monitoring code

pull/160/head
chen.ma 3 years ago
parent 850147297d
commit 24bb4b5633

@ -95,4 +95,12 @@ public class PoolRunStateInfo extends PoolBaseInfo implements Serializable {
*/ */
private Long timestamp; private Long timestamp;
public Integer getSimpleCurrentLoad() {
return Integer.parseInt(getCurrentLoad().replace("%", ""));
}
public Integer getSimplePeakLoad() {
return Integer.parseInt(getPeakLoad().replace("%", ""));
}
} }

@ -55,6 +55,16 @@
<artifactId>spring-cloud-context</artifactId> <artifactId>spring-cloud-context</artifactId>
<version>2.2.5.RELEASE</version> <version>2.2.5.RELEASE</version>
</dependency> </dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -12,6 +12,10 @@ apollo.bootstrap.eagerLoad.enabled=true
spring.profiles.active=dev spring.profiles.active=dev
spring.application.name=dynamic-threadpool-example spring.application.name=dynamic-threadpool-example
management.metrics.export.prometheus.enabled=true
management.server.port=29998
management.endpoints.web.exposure.include=*
spring.dynamic.thread-pool.enable=true spring.dynamic.thread-pool.enable=true
spring.dynamic.thread-pool.banner=true spring.dynamic.thread-pool.banner=true
spring.dynamic.thread-pool.check-state-interval=3 spring.dynamic.thread-pool.check-state-interval=3

Loading…
Cancel
Save