|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jmeter.monitor.util.Stats
public class Stats
Description:
Stats is responsible for calculating the load and health of a given server. It uses tomcat's status servlet results. A schema was generated for the XML output and JAXB was used to generate classes.
The equations are:
memory weight = (int)(50 * (free/max))
thread weight = (int)(50 * (current/max))
The load factors are stored in the properties files. Simply change the values in the properties to change how load is calculated. The defaults values are memory (50) and threads (50). The sum of the factors must equal 100.
Field Summary | |
---|---|
static int |
ACTIVE
|
static double |
ACTIVE_PER
|
static int |
DEAD
|
static int |
DEFAULT_MEMORY_FACTOR
|
static int |
DEFAULT_THREAD_FACTOR
|
static int |
HEALTHY
|
static double |
HEALTHY_PER
|
static int |
WARNING
|
static double |
WARNING_PER
|
Constructor Summary | |
---|---|
Stats()
|
Method Summary | |
---|---|
static int |
calculateLoad(Status stat)
The method is responsible for taking a status object and calculating an int value from 1 to 100. |
static int |
calculateMemoryLoad(Status stat)
Method will calculate the memory load: used / max = load. |
static int |
calculateStatus(Status stat)
Method should calculate if the server is: dead, active, warning or healthy. |
static int |
calculateThreadLoad(Status stat)
Method will calculate the thread load: busy / max = load. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEAD
public static final int ACTIVE
public static final int WARNING
public static final int HEALTHY
public static final int DEFAULT_MEMORY_FACTOR
public static final int DEFAULT_THREAD_FACTOR
public static final double HEALTHY_PER
public static final double ACTIVE_PER
public static final double WARNING_PER
Constructor Detail |
---|
public Stats()
Method Detail |
---|
public static int calculateLoad(Status stat)
stat
-
public static int calculateStatus(Status stat)
stat
-
public static int calculateMemoryLoad(Status stat)
stat
-
public static int calculateThreadLoad(Status stat)
stat
-
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |