public GetCounter ( string name ) : |
||
name | string | The name of the counter. |
return |
public Counter GetCounter(string name)
{
try
{
return _counters[name];
}
catch (Exception ex)
{
throw new NBenchException("error while retrieving counter", ex);
}
}
public void SetUp(BenchmarkContext context) { _inboundThroughputCounter = context.GetCounter(InboundThroughputCounterName); _counterHandlerInbound = new CounterHandlerInbound(_inboundThroughputCounter); _outboundThroughputCounter = context.GetCounter(OutboundThroughputCounterName); _counterHandlerOutbound = new CounterHandlerOutbound(_outboundThroughputCounter); channel = new EmbeddedChannel(_counterHandlerOutbound, _counterHandlerInbound); }