public interface Metric extends DebugSupport
| Modifier and Type | Method and Description |
|---|---|
void |
addBlock(int n)
Add current block count.
|
void |
addException(int n)
Add current exception count.
|
void |
addOccupiedPass(int acquireCount)
Add occupied pass, which represents pass requests that borrow the latter windows' token.
|
void |
addPass(int n)
Add current pass count.
|
void |
addRT(long rt)
Add given RT to current total RT.
|
void |
addSuccess(int n)
Add current completed count.
|
void |
addWaiting(long futureTime,
int acquireCount)
Add request that occupied.
|
long |
block()
Get total block count.
|
List<MetricNode> |
details()
Get aggregated metric nodes of all resources.
|
List<MetricNode> |
detailsOnCondition(Predicate<Long> timePredicate)
Generate aggregated metric items that satisfies the time predicate.
|
long |
exception()
Get total exception count.
|
int |
getSampleCount()
Get sample count of the sliding window.
|
double |
getWindowIntervalInSec()
Get the sliding window length in seconds.
|
long |
getWindowPass(long timeMillis)
Note: this operation will not perform refreshing, so will not generate new buckets.
|
long |
maxSuccess()
Get max success count.
|
long |
minRt()
Get the minimal RT.
|
long |
occupiedPass()
Get occupied pass count.
|
long |
pass()
Get total pass count.
|
long |
previousWindowBlock() |
long |
previousWindowPass() |
long |
rt()
Get total response time.
|
long |
success()
Get total success count.
|
long |
waiting()
Get waiting pass account
|
MetricBucket[] |
windows()
Get the raw window array.
|
debuglong success()
long maxSuccess()
long exception()
long block()
long pass()
occupiedPass()long rt()
long minRt()
List<MetricNode> details()
List<MetricNode> detailsOnCondition(Predicate<Long> timePredicate)
timePredicate - time predicateMetricBucket[] windows()
void addException(int n)
n - count to addvoid addBlock(int n)
n - count to addvoid addSuccess(int n)
n - count to addvoid addPass(int n)
n - count to addvoid addRT(long rt)
rt - RTdouble getWindowIntervalInSec()
int getSampleCount()
long getWindowPass(long timeMillis)
timeMillis - valid time in msvoid addOccupiedPass(int acquireCount)
acquireCount - tokens count.void addWaiting(long futureTime,
int acquireCount)
futureTime - future timestamp that the acquireCount should be added on.acquireCount - tokens count.long waiting()
long occupiedPass()
long previousWindowBlock()
long previousWindowPass()
Copyright © 2021 Alibaba Group. All rights reserved.