Java Code Examples for com.netflix.servo.annotations.DataSourceType#INFORMATIONAL

The following examples show how to use com.netflix.servo.annotations.DataSourceType#INFORMATIONAL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NFHttpClient.java    From ribbon with Apache License 2.0 5 votes vote down vote up
@Monitor(name = "HttpClient-MaxTotalConnections", type = DataSourceType.INFORMATIONAL)
public int getMaxTotalConnnections() {
	ClientConnectionManager connectionManager = this.getConnectionManager();
	if (connectionManager != null) {
		return ((ThreadSafeClientConnManager)connectionManager).getMaxTotal();
	} else {
		return 0;
	}
}
 
Example 2
Source File: NFHttpClient.java    From ribbon with Apache License 2.0 5 votes vote down vote up
@Monitor(name = "HttpClient-MaxConnectionsPerHost", type = DataSourceType.INFORMATIONAL)
public int getMaxConnectionsPerHost() {
	ClientConnectionManager connectionManager = this.getConnectionManager();
	if (connectionManager != null) {
		if(httpRoute == null)
			return ((ThreadSafeClientConnManager)connectionManager).getDefaultMaxPerRoute();
		else
			return ((ThreadSafeClientConnManager)connectionManager).getMaxForRoute(httpRoute);
	} else {
		return 0;
	}
}
 
Example 3
Source File: ZoneStats.java    From ribbon with Apache License 2.0 5 votes vote down vote up
@Monitor(name=PREFIX + "CircuitBreakerTrippedPercentage", type = DataSourceType.INFORMATIONAL)    
public double getCircuitBreakerTrippedPercentage() {
    ZoneSnapshot snapShot = loadBalancerStats.getZoneSnapshot(zone);
    int totalCount = snapShot.getInstanceCount();
    int circuitTrippedCount = snapShot.getCircuitTrippedCount();
    if (totalCount == 0) {
        if (circuitTrippedCount != 0) {
            return -1;
        } else {
            return 0;
        }
    } else {
        return snapShot.getCircuitTrippedCount() / ((double) totalCount); 
    }
}
 
Example 4
Source File: DynamicServerListLoadBalancer.java    From ribbon with Apache License 2.0 4 votes vote down vote up
@Monitor(name="LastUpdated", type=DataSourceType.INFORMATIONAL)
public String getLastUpdate() {
    return serverListUpdater.getLastUpdate();
}
 
Example 5
Source File: ZoneStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
@Monitor(name=PREFIX + "ActiveRequestsCount", type = DataSourceType.INFORMATIONAL)    
public int getActiveRequestsCount() {
    return loadBalancerStats.getActiveRequestsCount(zone);
}
 
Example 6
Source File: LoadBalancerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
@Monitor(name=PREFIX + "AvailableZones", type = DataSourceType.INFORMATIONAL)   
public Set<String> getAvailableZones() {
    return upServerListZoneMap.keySet();
}
 
Example 7
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the 98-th percentile in the total amount of time spent handling a request, in milliseconds.
 */
@Monitor(name = "ResponseTimeMillis98Percentile", type = DataSourceType.INFORMATIONAL,
         description = "98th percentile in total time to handle a request, in milliseconds")
public double getResponseTime98thPercentile() {
    return getResponseTimePercentile(Percent.NINETY_EIGHT);
}
 
Example 8
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the 90-th percentile in the total amount of time spent handling a request, in milliseconds.
 */
@Monitor(name = "ResponseTimeMillis90Percentile", type = DataSourceType.INFORMATIONAL,
         description = "90th percentile in total time to handle a request, in milliseconds")
public double getResponseTime90thPercentile() {
    return getResponseTimePercentile(Percent.NINETY);
}
 
Example 9
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the 75-th percentile in the total amount of time spent handling a request, in milliseconds.
 */
@Monitor(name = "ResponseTimeMillis75Percentile", type = DataSourceType.INFORMATIONAL,
         description = "75th percentile in total time to handle a request, in milliseconds")
public double getResponseTime75thPercentile() {
    return getResponseTimePercentile(Percent.SEVENTY_FIVE);
}
 
Example 10
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the 50-th percentile in the total amount of time spent handling a request, in milliseconds.
 */
@Monitor(name = "ResponseTimeMillis50Percentile", type = DataSourceType.INFORMATIONAL,
         description = "50th percentile in total time to handle a request, in milliseconds")
public double getResponseTime50thPercentile() {
    return getResponseTimePercentile(Percent.FIFTY);
}
 
Example 11
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the 25-th percentile in the total amount of time spent handling a request, in milliseconds.
 */
@Monitor(name = "ResponseTimeMillis25Percentile", type = DataSourceType.INFORMATIONAL,
         description = "25th percentile in total time to handle a request, in milliseconds")
public double getResponseTime25thPercentile() {
    return getResponseTimePercentile(Percent.TWENTY_FIVE);
}
 
Example 12
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the time when the varios percentile data was last updated.
 */
@Monitor(name = "ResponseTimePercentileWhen", type = DataSourceType.INFORMATIONAL,
         description = "The time the percentile values were computed")
public String getResponseTimePercentileTime() {
    return dataDist.getTimestamp();
}
 
Example 13
Source File: NFHttpClient.java    From ribbon with Apache License 2.0 4 votes vote down vote up
@Monitor(name = "HttpClient-ConnPoolCleaner", type = DataSourceType.INFORMATIONAL)
public ConnectionPoolCleaner getConnPoolCleaner() {
	return connPoolCleaner;
}
 
Example 14
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the minimum amount of time spent handling a request, in milliseconds.
 */
@Monitor(name = "OverallResponseTimeMillisMin", type = DataSourceType.INFORMATIONAL,
         description = "Min total time for a request, in milliseconds")
public double getResponseTimeMin() {
    return responseTimeDist.getMinimum();
}
 
Example 15
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the maximum amount of time spent handling a request, in milliseconds.
 */
@Monitor(name = "OverallResponseTimeMillisMax", type = DataSourceType.INFORMATIONAL,
         description = "Max total time for a request, in milliseconds")
public double getResponseTimeMax() {
    return responseTimeDist.getMaximum();
}
 
Example 16
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the average total amount of time to handle a request, in milliseconds.
 */
@Monitor(name = "OverallResponseTimeMillisAvg", type = DataSourceType.INFORMATIONAL,
         description = "Average total time for a request, in milliseconds")
public double getResponseTimeAvg() {
    return responseTimeDist.getMean();
}
 
Example 17
Source File: ServerStats.java    From ribbon with Apache License 2.0 4 votes vote down vote up
@Monitor(name="CircuitBreakerTripped", type = DataSourceType.INFORMATIONAL)    
public boolean isCircuitBreakerTripped() {
    return isCircuitBreakerTripped(System.currentTimeMillis());
}
 
Example 18
Source File: NFHttpClient.java    From ribbon with Apache License 2.0 4 votes vote down vote up
@Monitor(name = "HttpClient-SleepTimeFactorMs", type = DataSourceType.INFORMATIONAL)
public int getSleepTimeFactorMs() {
	return this.sleepTimeFactorMsProperty.getOrDefault();
}
 
Example 19
Source File: NFHttpClient.java    From ribbon with Apache License 2.0 4 votes vote down vote up
@Monitor(name = "HttpClient-NumRetries", type = DataSourceType.INFORMATIONAL)
public int getNumRetries() {
	return this.retriesProperty.getOrDefault();
}
 
Example 20
Source File: NFHttpClient.java    From ribbon with Apache License 2.0 4 votes vote down vote up
@Monitor(name = "HttpClient-ConnIdleEvictTimeMilliSeconds", type = DataSourceType.INFORMATIONAL)
public Property<Integer> getConnIdleEvictTimeMilliSeconds() {
	return connIdleEvictTimeMilliSeconds;
}