Package com.springsource.insight.intercept.resource

Examples of com.springsource.insight.intercept.resource.ResourceKey


        TimeRange range = new TimeRange(7365L, 3777347L);
        String actionName = "testExtraMetricsGeneration";
        Trace trace = createMockTrace(range, actionName);
        Frame root = trace.getRootFrame();
        EndPointName ep = EndPointName.valueOf(actionName);
        ResourceKey rKey = ep.makeKey();
        Collection<MetricsBag> mbList =
                ((EclipsePersistenceMetricsGenerator) gen).addExtraEndPointMetrics(trace, rKey, Collections.singletonList(root));
        assertEquals("Mismatched metrics count", 1, ListUtil.size(mbList));

        MetricsBag mb = ListUtil.getFirstMember(mbList);
View Full Code Here


        assertMetricsResult(createTrace(root), "testMultipleErrorCounts", totalCount);
    }

    static MetricsBag assertMetricsResult(Trace trace, String endpointName, int expectedCount) {
        ResourceKey resourceKey = ResourceKey.valueOf(ResourceNames.EndPoint, endpointName);
        List<MetricsBag> mbList = generator.generateMetrics(trace, resourceKey);
        if (expectedCount <= 0) {
            assertEquals("Unepected metrics generated: " + mbList, 0, ListUtil.size(mbList));
            return null;
        }
View Full Code Here

            return Collections.emptyList();
        }

        Frame frame = ListUtil.getFirstMember(frames);
        Operation op = frame.getOperation();
        ResourceKey resourceKey = getResourceKey(op, endpointResourceKey);
        TimeRange range = trace.getRange();
        int time = TimeUtil.nanosToSeconds(range.getStart());
        MetricsBag mb = MetricsBag.create(resourceKey, range);

        // Add the response size data point
View Full Code Here

TOP

Related Classes of com.springsource.insight.intercept.resource.ResourceKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.