All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ksc.metrics.package-info Maven / Gradle / Ivy

Go to download

The KSC SDK for Java - Core module holds the classes that is used by the individual service clients to interact with KSC Web Services. Users need to depend on KSC-java-sdk artifact for accessing individual client classes.

The newest version!
/*
 * Copyright 2010-2016 ksyun.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 *  http://ksyun.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

/**
 * Classes used to support the KSC SDK metrics API.
 * 
 * When the default metric collection system is enabled, 
 * the default KSC SDK implementation
 * captures a set of predefined core metrics that are grouped under three major 
 * categories:  KSC Request Metrics, KSC Service Metrics, and Machine Metrics.
 * 

Nomenclature

*
    *
  • Physical Http Request - an http request initiated by the http client library used by KSC Java SDK . No retry is involved, or at least not initiated from the JVM.
  • *
  • Logical Http Request - an http request initiated from the KSC Java SDK by executing the underlying http client library. A logical request may involve multiple physical requests due to retries.
  • *
  • Service Client type - the specific subtype of AmazonWebServiceClient, such as AmazonS3Client, AmazonDynamoDBClient, etc.
  • *
  • Request type - the specific subtype of AmazonWebServiceRequest, such as PutItemRequest, PutObjectRequest, etc.
  • *
  • Http Client Library - the Apache HttpComponents client library
  • *
* *

KSC Request Metrics

*
    *
  1. ClientExecuteTime - Total number of milliseconds taken for a * request/response including the time taken to execute the request handlers, * round trip to KSC, and the time taken to execute the response handlers. * Captured on a per request type level.
  2. *
  3. Exception - Number of logical request failure. Captured both on a per service * client type level and a per request type level.
  4. *
  5. HttpClientPoolAvailableCount - Number of idle persistent connections of * the underlying httpclient. * This metric is collected from the respective PoolStats before the connection of a request is obtained.
  6. *
  7. HttpClientPoolLeasedCount - Number of persistent connections tracked by * the underlying httpclient connection manager currently being used to execute * requests. * This metric is collected from the respective PoolStats before the connection of a request is obtained.
  8. *
  9. HttpClientPoolPendingCount - Number of connection requests being blocked * awaiting a free connection of the underlying httpclient. * This metric is collected from the respective PoolStats. before the connection of a request is obtained
  10. *
  11. HttpRequestTime - Number of milliseconds taken for a logical request/response * round trip to KSC. Captured on a per request type level.
  12. *
  13. HttpClientSendRequestTime - Number of milliseconds taken for a physical request * to get sent to KSC. Captured on a per request type level.
  14. *
  15. HttpClientReceiveResponseTime - Number of milliseconds taken for a physical response * to get received from KSC. Captured on a per request type level.
  16. *
  17. HttpClientRetryCount - Number of retries per physical request. Captured on a per service * client type level.
  18. *
  19. RequestCount - Number of logical requests. Captured on a per service * client type level.
  20. *
  21. RetryCount - Number of retries per logical request. Captured on a per service * client type level.
  22. *
  23. ThrottleException - Number of times of a request has been throttled by the service.
  24. *
  25. DynamoDBConsumedCapacity - Number of Amazon DynamoDB capacity units consumed. * Captured on a per request type level, and is only available if the request * has been specified with the necessary "ReturnConsumedCapacity" parameter. *
  26. *
*

KSC Service Metrics

*
    *
  1. HttpClientGetConnectionTime - Total number of milliseconds taken for the * underlying http client library to get a connection. *
  2. S3DownloadThroughput - Number of bytes downloaded from S3 per second.
  3. *
  4. S3DownloadByteCount - Number of bytes downloaded from S3.
  5. *
  6. S3UploadThroughput - Number of bytes uploaded to S3 per second.
  7. *
  8. S3UploadByteCount - Number of bytes uploaded to S3.
  9. *
*

Machine Metrics

*

Memory

*
    *
  1. TotalMemory - Total amount of memory currently available to the JVM for * current and future objects, measured in bytes. This value may vary over * time, depending on the host environment.
  2. *
  3. FreeMemory - An approximation to the total amount of memory currently * available to the JVM for future allocated objects, measured in bytes.
  4. *
  5. UsedMemory - TotalMemory minus FreeMemory.
  6. *
  7. SpareMemory - The maximum amount of memory that the JVM will attempt to * use, measured in bytes, minus UsedMemory.
  8. *
*

Threads

*
    *
  1. ThreadCount - The current number of live threads including both daemon * and non-daemon threads.
  2. *
  3. DeadLockThreadCount - The number of threads that are deadlocked waiting * for object monitors or ownable synchronizers, if any. Threads are deadlocked * in a cycle waiting for a lock of these two types if each thread owns one * lock while trying to acquire another lock already held by another thread in * the cycle. No metrics is generated when the value is zero.
  4. *
  5. DaemonThreadCount - The current number of live daemon threads. No metrics * is generated when the value is zero.
  6. *
  7. PeakThreadCount - The peak live thread count since the JVM started or * since the peak was reset.
  8. *
  9. TotalStartedThreadCount - The total number of threads created and also * started since the JVM started.
  10. *
*

File Descriptors

*
    *
  1. OpenFileDescriptorCount - Number of opened file descriptors of the * operating system.
  2. *
  3. SpareFileDescriptorCount - Maximum number of file descriptors of the * operating system minus OpenFileDescriptorCount.
  4. *
*/ package com.ksc.metrics;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy