Example #1
0
 public void SetUp()
 {
     _enterCount = new UintValue(1);
     _wallClockDurationHns = new Uint64Value(2);
     _activeTime = new DoubleValue(3);
     Mock<IEnumerable<Method>> mockCallingMethods = new Mock<IEnumerable<Method>>(MockBehavior.Strict);
     Mock<IEnumerable<Method>> mockCalledMethods = new Mock<IEnumerable<Method>>(MockBehavior.Strict);
     _method = new TracingMethod(1,"stub", 20, 50, "MethodFull", @"C:\code\source.cs",_enterCount,_wallClockDurationHns,_activeTime );//, mockCallingMethods.Object,
                          //mockCalledMethods.Object);
 }
 public TracingCriteriaContext(UintValue maxCallCount, Uint64Value maxTimeWallClock, DoubleValue maxTimeActive)
 {
     Contract.Requires(maxCallCount != null);
     Contract.Requires(maxTimeWallClock != null);
     Contract.Requires(maxTimeActive != null);
     _maxCallCount = maxCallCount;
     _maxTimeWallClock = maxTimeWallClock;
     _maxTimeWallClock = maxTimeWallClock;
     _maxTimeActive = maxTimeActive;
     _availableCriteria = new Criterion[] { CallCountCriterion, TimeWallClockCriterion, TimeActiveCriterion };
 }
 public TracingCriteriaContext(UintValue maxCallCount, Uint64Value maxTimeWallClock, DoubleValue maxTimeActive)
 {
     Contract.Requires(maxCallCount != null);
     Contract.Requires(maxTimeWallClock != null);
     Contract.Requires(maxTimeActive != null);
     _maxCallCount      = maxCallCount;
     _maxTimeWallClock  = maxTimeWallClock;
     _maxTimeWallClock  = maxTimeWallClock;
     _maxTimeActive     = maxTimeActive;
     _availableCriteria = new Criterion[] { CallCountCriterion, TimeWallClockCriterion, TimeActiveCriterion };
 }
Example #4
0
        public void SetUp()
        {
            _enterCount           = new UintValue(1);
            _wallClockDurationHns = new Uint64Value(2);
            _activeTime           = new DoubleValue(3);
            Mock <IEnumerable <Method> > mockCallingMethods = new Mock <IEnumerable <Method> >(MockBehavior.Strict);
            Mock <IEnumerable <Method> > mockCalledMethods  = new Mock <IEnumerable <Method> >(MockBehavior.Strict);

            _method = new TracingMethod(1, "stub", 20, 50, "MethodFull", @"C:\code\source.cs", _enterCount, _wallClockDurationHns, _activeTime);//, mockCallingMethods.Object,
            //mockCalledMethods.Object);
        }
        public void SetUp()
        {
            _callCountCriterion = new CallCountCriterion();
            _timeActiveCriterion = new TimeActiveCriterion();
            _timeWallClockCriterion = new TimeWallClockCriterion();

            _maxCallCount = new UintValue(50);
            _maxTimeWallClock = new Uint64Value(100);
            _maxTimeActive = new DoubleValue(150);
            _tracingCriteriaContext = new TracingCriteriaContext(_maxCallCount, _maxTimeWallClock, _maxTimeActive);
        }
        public void SetUp()
        {
            _callCountCriterion     = new CallCountCriterion();
            _timeActiveCriterion    = new TimeActiveCriterion();
            _timeWallClockCriterion = new TimeWallClockCriterion();

            _maxCallCount           = new UintValue(50);
            _maxTimeWallClock       = new Uint64Value(100);
            _maxTimeActive          = new DoubleValue(150);
            _tracingCriteriaContext = new TracingCriteriaContext(_maxCallCount, _maxTimeWallClock, _maxTimeActive);
        }
Example #7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (column_ != null)
            {
                hash ^= Column.GetHashCode();
            }
            if (NegateComparator != false)
            {
                hash ^= NegateComparator.GetHashCode();
            }
            if (Comparator != global::LukeKennedy.LSQL.Net.Comparator.UnknownComparator)
            {
                hash ^= Comparator.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.Int64Value)
            {
                hash ^= Int64Value.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.Uint64Value)
            {
                hash ^= Uint64Value.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.DoubleValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (valueCase_ == ValueOneofCase.BoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.BytesValue)
            {
                hash ^= BytesValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.TimeValue)
            {
                hash ^= TimeValue.GetHashCode();
            }
            hash ^= (int)valueCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (BoolValue != false)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (Int32Value != 0)
            {
                hash ^= Int32Value.GetHashCode();
            }
            if (Uint32Value != 0)
            {
                hash ^= Uint32Value.GetHashCode();
            }
            if (Int64Value != 0L)
            {
                hash ^= Int64Value.GetHashCode();
            }
            if (Uint64Value != 0UL)
            {
                hash ^= Uint64Value.GetHashCode();
            }
            if (Sint32Value != 0)
            {
                hash ^= Sint32Value.GetHashCode();
            }
            if (Sint64Value != 0L)
            {
                hash ^= Sint64Value.GetHashCode();
            }
            if (FloatValue != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FloatValue);
            }
            if (DoubleValue != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (EnumValue != 0)
            {
                hash ^= EnumValue.GetHashCode();
            }
            if (StringValue.Length != 0)
            {
                hash ^= StringValue.GetHashCode();
            }
            return(hash);
        }
Example #9
0
 public TracingMethod(
     uint id,
     string name,
     int firstLineNumber,
     int lineExtend,
     string classFullName,
     string sourceFile,
     UintValue callCountValue,
     Uint64Value timeWallClockValue,
     DoubleValue timeActiveValue)
     : base(id, name, firstLineNumber, lineExtend, classFullName, sourceFile)
 {
     _callCountValue     = callCountValue;
     _timeWallClockValue = timeWallClockValue;
     _timeActiveValue    = timeActiveValue;
 }
Example #10
0
 public TracingMethod(
     uint id,
     string name,
     int firstLineNumber,
     int lineExtend,
     string classFullName,
     string sourceFile,
     UintValue callCountValue,
     Uint64Value timeWallClockValue,
     DoubleValue timeActiveValue)
     : base(id, name, firstLineNumber, lineExtend,classFullName,sourceFile)
 {
     _callCountValue = callCountValue;
     _timeWallClockValue = timeWallClockValue;
     _timeActiveValue = timeActiveValue;
 }
        protected void CreateCriteriaContext()
        {
            var maxCallCount = new UintValue(uint.MinValue);
            var maxWallClockDuration = new Uint64Value(uint.MinValue);
            var maxActiveTime = new DoubleValue(double.MinValue);
            foreach (Method method in _methodDictionary.Values)
            {
                maxCallCount =
                    (UintValue) Max(method.GetValueFor(TracingCriteriaContext.CallCountCriterion), maxCallCount);
                maxWallClockDuration =
                    (Uint64Value)
                    Max(method.GetValueFor(TracingCriteriaContext.TimeWallClockCriterion), maxWallClockDuration);
                maxActiveTime =
                    (DoubleValue) Max(method.GetValueFor(TracingCriteriaContext.TimeActiveCriterion), maxActiveTime);
            }

            CriteriaContext = new TracingCriteriaContext(
                maxCallCount,
                maxWallClockDuration,
                maxActiveTime);
        }
        protected void CreateCriteriaContext()
        {
            var maxCallCount         = new UintValue(uint.MinValue);
            var maxWallClockDuration = new Uint64Value(uint.MinValue);
            var maxActiveTime        = new DoubleValue(double.MinValue);

            foreach (Method method in _methodDictionary.Values)
            {
                maxCallCount =
                    (UintValue)Max(method.GetValueFor(TracingCriteriaContext.CallCountCriterion), maxCallCount);
                maxWallClockDuration =
                    (Uint64Value)
                    Max(method.GetValueFor(TracingCriteriaContext.TimeWallClockCriterion), maxWallClockDuration);
                maxActiveTime =
                    (DoubleValue)Max(method.GetValueFor(TracingCriteriaContext.TimeActiveCriterion), maxActiveTime);
            }

            CriteriaContext = new TracingCriteriaContext(
                maxCallCount,
                maxWallClockDuration,
                maxActiveTime);
        }