public FakeCounterCategory(string name) : base(name) { var inSyncRoot = new object(); InTotal = new SumTotal(inSyncRoot); InPerSec = new RatePerSecond(InTotal, inSyncRoot); var outSyncRoot = new object(); OutTotal = new SumTotal(outSyncRoot); OutPerSec = new RatePerSecond(OutTotal, outSyncRoot); PendingCount = new Delta( InTotal, OutTotal, outSyncRoot); PendingTimeAverage = new MovingAverage( syncRoot: outSyncRoot); var errorsSyncRoot = new object(); ErrorsTotal = new SumTotal(errorsSyncRoot); ErrorsPerSec = new RatePerSecond(ErrorsTotal, errorsSyncRoot); ErrorRatio = new MeanAverage( ErrorsTotal, InTotal, errorsSyncRoot); }
public override void Call(RpcServerContext ctx) { if (RatePerSecond != null) { try { if (RatePerSecond != null) { RatePerSecond.Increment(); Concurrent.Increment(); } Method.Invoke(Service, new object[] { new RpcBatchServerContext(ctx) }); } catch (Exception ex) { ctx.ReturnError(RpcErrorCode.ServerError, ex); } finally { Concurrent.Decrement(); } } else { try { Method.Invoke(Service, new object[] { new RpcBatchServerContext(ctx) }); } catch (Exception ex) { ctx.ReturnError(RpcErrorCode.ServerError, ex); } } }
public FakeCounterCategory2(string name) : base(name) { InPerSec = new RatePerSecond(); }
public FakeIncorrectTypeParamCounterCategory(string name) : base(name) { OutPerSec = new RatePerSecond(); }