接口 Node
- 所有超级接口:
DebugSupport,OccupySupport
- 所有已知实现类:
ClusterNode,DefaultNode,EntranceNode,StatisticNode
Holds real-time statistics for resources.
- 作者:
- qinan.qn, leyou, Eric Zhao
-
方法概要
修饰符和类型方法说明voidaddPassRequest(int count) Add pass count.voidaddRtAndSuccess(long rt, int success) Add rt and success count.doubleavgRt()Get average rt per second.doubleblockQps()Get block request per second.longGet blocked request count per minute (totalBlockRequest).intGet current active thread count.voidDecrease current thread count.doubleGet exception count per second.voidincreaseBlockQps(int count) Increase the block count.voidincreaseExceptionQps(int count) Add the biz exception count.voidIncrease current thread count.doubleGet estimated max success QPS till now.metrics()Fetch all valid metric nodes of resources.doubleminRt()Get minimal response time.doublepassQps()Get pass request per second.doubleGet last second block QPS.doubleLast window QPS.rawMetricsInMin(Predicate<Long> timePredicate) Fetch all raw metric items that satisfies the time predicate.voidreset()Reset the internal counter.doubleGetEntry.exit()request per second.longGet exception count per minute.longGet pass count per minute.doubletotalQps()GetpassQps()+blockQps()request per second.longGet incoming request per minute (pass + block).longGetEntry.exit()count per minute.从接口继承的方法 com.alibaba.csp.sentinel.slots.statistic.metric.DebugSupport
debug从接口继承的方法 com.alibaba.csp.sentinel.node.OccupySupport
addOccupiedPass, addWaitingRequest, occupiedPassQps, tryOccupyNext, waiting
-
方法详细资料
-
totalRequest
long totalRequest()Get incoming request per minute (pass + block).- 返回:
- total request count per minute
-
totalPass
long totalPass()Get pass count per minute.- 返回:
- total passed request count per minute
- 从以下版本开始:
- 1.5.0
-
totalSuccess
long totalSuccess()GetEntry.exit()count per minute.- 返回:
- total completed request count per minute
-
blockRequest
long blockRequest()Get blocked request count per minute (totalBlockRequest).- 返回:
- total blocked request count per minute
-
totalException
long totalException()Get exception count per minute.- 返回:
- total business exception count per minute
-
passQps
double passQps()Get pass request per second.- 返回:
- QPS of passed requests
-
blockQps
double blockQps()Get block request per second.- 返回:
- QPS of blocked requests
-
totalQps
double totalQps()GetpassQps()+blockQps()request per second.- 返回:
- QPS of passed and blocked requests
-
successQps
double successQps()GetEntry.exit()request per second.- 返回:
- QPS of completed requests
-
maxSuccessQps
double maxSuccessQps()Get estimated max success QPS till now.- 返回:
- max completed QPS
-
exceptionQps
double exceptionQps()Get exception count per second.- 返回:
- QPS of exception occurs
-
avgRt
double avgRt()Get average rt per second.- 返回:
- average response time per second
-
minRt
double minRt()Get minimal response time.- 返回:
- recorded minimal response time
-
curThreadNum
int curThreadNum()Get current active thread count.- 返回:
- current active thread count
-
previousBlockQps
double previousBlockQps()Get last second block QPS. -
previousPassQps
double previousPassQps()Last window QPS. -
metrics
Map<Long,MetricNode> metrics()Fetch all valid metric nodes of resources.- 返回:
- valid metric nodes of resources
-
rawMetricsInMin
Fetch all raw metric items that satisfies the time predicate.- 参数:
timePredicate- time predicate- 返回:
- raw metric items that satisfies the time predicate
- 从以下版本开始:
- 1.7.0
-
addPassRequest
void addPassRequest(int count) Add pass count.- 参数:
count- count to add pass
-
addRtAndSuccess
void addRtAndSuccess(long rt, int success) Add rt and success count.- 参数:
rt- response timesuccess- success count to add
-
increaseBlockQps
void increaseBlockQps(int count) Increase the block count.- 参数:
count- count to add
-
increaseExceptionQps
void increaseExceptionQps(int count) Add the biz exception count.- 参数:
count- count to add
-
increaseThreadNum
void increaseThreadNum()Increase current thread count. -
decreaseThreadNum
void decreaseThreadNum()Decrease current thread count. -
reset
void reset()Reset the internal counter. Reset is needed whenIntervalProperty.INTERVALorSampleCountProperty.SAMPLE_COUNTis changed.
-