diff --git a/test/metric/metric_validation_util.go b/test/metric/metric_validation_util.go index 6e78d59a0..b1eba40a6 100644 --- a/test/metric/metric_validation_util.go +++ b/test/metric/metric_validation_util.go @@ -27,7 +27,7 @@ func IsAllValuesGreaterThanOrEqualToExpectedValue(metricName string, values []fl } totalSum += value } - metricErrorBound := 0.1 + metricErrorBound := 0.15 metricAverageValue := totalSum / float64(len(values)) upperBoundValue := expectedValue * (1 + metricErrorBound) lowerBoundValue := expectedValue * (1 - metricErrorBound) diff --git a/test/metric_value_benchmark/agent_configs/jmx_tomcat_jvm_config.json b/test/metric_value_benchmark/agent_configs/jmx_tomcat_jvm_config.json index fc2b09ac2..441023171 100644 --- a/test/metric_value_benchmark/agent_configs/jmx_tomcat_jvm_config.json +++ b/test/metric_value_benchmark/agent_configs/jmx_tomcat_jvm_config.json @@ -1,6 +1,7 @@ { "agent": { - "debug": true + "debug": true, + "metrics_collection_interval": 60 }, "metrics": { "namespace": "MetricValueBenchmarkJMXTest", diff --git a/test/metric_value_benchmark/jmx_tomcat_jvm_test.go b/test/metric_value_benchmark/jmx_tomcat_jvm_test.go index ad9e2758c..8597c043a 100644 --- a/test/metric_value_benchmark/jmx_tomcat_jvm_test.go +++ b/test/metric_value_benchmark/jmx_tomcat_jvm_test.go @@ -46,7 +46,7 @@ func (t *JMXTomcatJVMTestRunner) GetAgentConfigFileName() string { } func (t *JMXTomcatJVMTestRunner) GetAgentRunDuration() time.Duration { - return 2 * time.Minute + return 5 * time.Minute } func (t *JMXTomcatJVMTestRunner) SetupBeforeAgentRun() error { @@ -57,7 +57,14 @@ func (t *JMXTomcatJVMTestRunner) SetupBeforeAgentRun() error { log.Println("set up jvm and tomcat") startJMXCommands := []string{ - "nohup java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=2030 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.rmi.port=2030 -Dcom.sun.management.jmxremote.host=0.0.0.0 -Djava.rmi.server.hostname=0.0.0.0 -Dserver.port=8090 -Dspring.application.admin.enabled=true -jar jars/spring-boot-web-starter-tomcat.jar > /tmp/spring-boot-web-starter-tomcat-jar.txt 2>&1 &", + "nohup java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=2030 " + + "-Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false " + + "-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.rmi.port=2030 " + + "-Dcom.sun.management.jmxremote.host=0.0.0.0 -Djava.rmi.server.hostname=0.0.0.0 " + + "-Dserver.port=8090 -Dspring.application.admin.enabled=true " + + "-Dserver.tomcat.mbeanregistry.enabled=true -Dmanagement.endpoints.jmx.exposure.include=* " + + "-XX:+UseConcMarkSweepGC -verbose:gc " + + "-jar jars/spring-boot-web-starter-tomcat.jar > /tmp/spring-boot-web-starter-tomcat-jar.txt 2>&1 &", } err = common.RunCommands(startJMXCommands)