Example #1
0
 public MetricsCollectionAspect(
     IMethodInvocationRecorder methodInvocationRecorder, ITimeSource timeSource)
 {
     this._methodInvocationRecorder = methodInvocationRecorder;
     this._timeSource = timeSource;
     _debugSessionStartTimestampUs = _timeSource.GetTimestampUs();
 }
Example #2
0
        public void SetUp()
        {
            methodInfo     = MethodInfoUtil.GetMethodInfo <DummyObject>(x => x.SetValue(1));
            mockInvocation = Substitute.For <IInvocation>();
            mockInvocation.MethodInvocationTarget.Returns(methodInfo);

            fakeTimeSource = new MonotonicTimeSource();
            mockMethodInvocationRecorder = Substitute.For <IMethodInvocationRecorder>();
            metricsCollectionAspect      = new MetricsCollectionAspect(
                mockMethodInvocationRecorder, fakeTimeSource);
        }