public void IsCombinableWith_ReturnsFalse_IfDifferentSegmentType()
        {
            var segment1 = createMethodSegmentBuilder(new TimeSpan(), TimeSpan.FromSeconds(2), 2, 1, new MethodCallData("type", "method", 1), Enumerable.Empty <KeyValuePair <string, object> >(), "declaredType", "declaredMethod", true);
            var segment2 = SimpleSegmentDataTests.createSimpleSegmentBuilder(new TimeSpan(), TimeSpan.FromSeconds(2), 2, 1, new MethodCallData("type", "method", 1), Enumerable.Empty <KeyValuePair <string, object> >(), "name", true);

            Assert.IsFalse(segment1.IsCombinableWith(segment2));
        }
Exemple #2
0
        public void IsCombinableWith_ReturnsFalse_IfDifferentSegmentType()
        {
            var segment1 = createExternalSegmentBuilder(new TimeSpan(), TimeSpan.FromSeconds(2), 2, 1, new MethodCallData("type", "method", 1), Enumerable.Empty <KeyValuePair <string, object> >(), new Uri("http://www.google.com"), "declaredMethod", new CrossApplicationResponseData("cpId", "name", 1.1f, 2.2f, 3), true);
            var segment2 = SimpleSegmentDataTests.createSimpleSegmentBuilder(new TimeSpan(), TimeSpan.FromSeconds(2), 2, 1, new MethodCallData("type", "method", 1), Enumerable.Empty <KeyValuePair <string, object> >(), "name", true);

            Assert.IsFalse(segment1.IsCombinableWith(segment2));
        }
        public static Segment createMethodSegmentBuilder(TimeSpan start, TimeSpan duration, int uniqueId, int?parentId, MethodCallData methodCallData, IEnumerable <KeyValuePair <string, object> > enumerable, string type, string method, bool combinable)
        {
            var segment = new Segment(SimpleSegmentDataTests.createTransactionSegmentState(uniqueId, parentId), methodCallData);

            segment.SetSegmentData(new MethodSegmentData(type, method));
            segment.Combinable = combinable;

            return(new Segment(start, duration, segment, null));
        }
Exemple #4
0
        public static Segment createMessageBrokerSegmentBuilder(TimeSpan start, TimeSpan duration, int uniqueId, int?parentId, MethodCallData methodCallData, IEnumerable <KeyValuePair <string, object> > enumerable, string vendor, string queue, MetricNames.MessageBrokerDestinationType type, MetricNames.MessageBrokerAction action, bool combinable)
        {
            var segment = new Segment(SimpleSegmentDataTests.createTransactionSegmentState(uniqueId, parentId), methodCallData);

            segment.SetSegmentData(new MessageBrokerSegmentData(vendor, queue, type, action));
            segment.Combinable = combinable;

            return(new Segment(start, duration, segment, null));
        }
Exemple #5
0
        public static Segment createExternalSegmentBuilder(TimeSpan relativeStart, TimeSpan duration, int uniqueId, int?parentId, MethodCallData methodCallData, IEnumerable <KeyValuePair <string, object> > parameters, Uri uri, string method, CrossApplicationResponseData crossApplicationResponseData, bool combinable)
        {
            var data    = new ExternalSegmentData(uri, method, crossApplicationResponseData);
            var segment = new Segment(SimpleSegmentDataTests.createTransactionSegmentState(uniqueId, parentId), methodCallData);

            segment.SetSegmentData(data);
            segment.Combinable = combinable;

            return(segment);
        }