public class ServerMetricsCollector extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ServerMetricsCollector.RequestErrorType |
Constructor and Description |
---|
ServerMetricsCollector() |
Modifier and Type | Method and Description |
---|---|
static ServerMetricsCollector |
getInstance() |
static void |
init(HTTPServerConfig config) |
void |
logCheck(Language language,
long milliseconds,
int textSize,
int matchCount,
JLanguageTool.Mode mode) |
void |
logFailedHealthcheck() |
void |
logRequest() |
void |
logRequestError(ServerMetricsCollector.RequestErrorType type) |
void |
logResponse(int httpCode) |
void |
monitorCache(String name,
com.google.common.cache.Cache cache) |
static void |
stop() |
public static final String UNKNOWN
public static void init(HTTPServerConfig config) throws IOException
IOException
public static void stop()
public static ServerMetricsCollector getInstance()
public void monitorCache(String name, com.google.common.cache.Cache cache)
public void logCheck(Language language, long milliseconds, int textSize, int matchCount, JLanguageTool.Mode mode)
public void logRequestError(ServerMetricsCollector.RequestErrorType type)
public void logRequest()
public void logResponse(int httpCode)
public void logFailedHealthcheck()