public class Context extends Object
EntranceNode: the root of the current invocation
tree.Entry: the current invocation point.Node: the statistics related to the
Entry.
Each SphU#entry() or SphO#entry() should be in a Context,
if we don't invoke ContextUtil#enter() explicitly, DEFAULT context will be used.
A invocation tree will be created if we invoke SphU#entry() multi times in
the same context.
Same resource in different context will count separately, see NodeSelectorSlot.
ContextUtil,
NodeSelectorSlot| Constructor and Description |
|---|
Context(DefaultNode entranceNode,
String name) |
Context(String name,
DefaultNode entranceNode,
boolean async) |
| Modifier and Type | Method and Description |
|---|---|
Entry |
getCurEntry() |
Node |
getCurNode() |
DefaultNode |
getEntranceNode() |
Node |
getLastNode()
Get the parent
Node of the current. |
String |
getName() |
String |
getOrigin() |
double |
getOriginAvgRt() |
double |
getOriginBlockQps() |
long |
getOriginBlockRequest() |
int |
getOriginCurThreadNum() |
Node |
getOriginNode() |
double |
getOriginPassQps() |
double |
getOriginPassReqQps() |
double |
getOriginTotalQps() |
long |
getOriginTotalRequest() |
boolean |
isAsync() |
static Context |
newAsyncContext(DefaultNode entranceNode,
String name)
Create a new async context.
|
Context |
setCurEntry(Entry curEntry) |
Context |
setCurNode(Node node) |
Context |
setOrigin(String origin) |
String |
toString() |
public Context(DefaultNode entranceNode, String name)
public Context(String name, DefaultNode entranceNode, boolean async)
public static Context newAsyncContext(DefaultNode entranceNode, String name)
entranceNode - entrance node of the contextname - context namepublic boolean isAsync()
public String getName()
public Node getCurNode()
public Entry getCurEntry()
public String getOrigin()
public double getOriginTotalQps()
public double getOriginBlockQps()
public double getOriginPassReqQps()
public double getOriginPassQps()
public long getOriginTotalRequest()
public long getOriginBlockRequest()
public double getOriginAvgRt()
public int getOriginCurThreadNum()
public DefaultNode getEntranceNode()
public Node getLastNode()
Node of the current.public Node getOriginNode()
Copyright © 2021 Alibaba Group. All rights reserved.