public class RpcInstrumentation extends Object implements MetricsSource
限定符和类型 | 类和说明 |
---|---|
static class |
RpcInstrumentation.Detailed
Use a separate source for detailed (per call) RPC metrics for
easy and efficient filtering
|
限定符和类型 | 方法和说明 |
---|---|
void |
addRpcProcessingTime(int processingTime)
Add an RPC processing time sample
|
void |
addRpcProcessingTime(String methodName,
int processingTime)
Add an RPC processing time sample for a particular RPC method
|
void |
addRpcQueueTime(int qTime)
Add an RPC queue time sample
|
static RpcInstrumentation |
create(String serverName,
int port)
Create an RPC instrumentation object
|
static RpcInstrumentation |
create(String serverName,
int port,
MetricsSystem ms)
Create an RPC instrumentation object
Mostly useful for testing.
|
MetricsSource |
detailed() |
void |
getMetrics(MetricsBuilder builder,
boolean all)
Get metrics from the source
|
void |
incrAuthenticationFailures()
One authentication failure event
|
void |
incrAuthenticationSuccesses()
One authentication success event
|
void |
incrAuthorizationFailures()
One authorization failure event
|
void |
incrAuthorizationSuccesses()
One authorization success event
|
void |
incrReceivedBytes(int count)
Increment received bytes by count
|
void |
incrSentBytes(int count)
Increment sent bytes by count
|
void |
shutdown()
Shutdown the instrumentation for the process
|
public void getMetrics(MetricsBuilder builder, boolean all)
MetricsSource
getMetrics
在接口中 MetricsSource
builder
- to contain the resulting metrics snapshotall
- if true, return all metrics even if unchanged.public static RpcInstrumentation create(String serverName, int port)
serverName
- name of the serverport
- the RPC portpublic static RpcInstrumentation create(String serverName, int port, MetricsSystem ms)
serverName
- name of the serverport
- the RPC portms
- the metrics system objectpublic MetricsSource detailed()
public void incrAuthenticationFailures()
public void incrAuthenticationSuccesses()
public void incrAuthorizationSuccesses()
public void incrAuthorizationFailures()
public void shutdown()
public void incrSentBytes(int count)
count
- to incrementpublic void incrReceivedBytes(int count)
count
- to incrementpublic void addRpcQueueTime(int qTime)
qTime
- public void addRpcProcessingTime(int processingTime)
processingTime
- public void addRpcProcessingTime(String methodName, int processingTime)
methodName
- method name of the RPCprocessingTime
- elapsed processing time of the RPCCopyright © 2009 The Apache Software Foundation