Package com.springsource.insight.util.time

Examples of com.springsource.insight.util.time.TimeRange


    }

    @Test
    public void testAnalyzeNoHttpFrame() {
        Operation op = createControllerOperation(false);
        Frame frame = new SimpleFrame(FrameId.valueOf("3777347"), null, op, new TimeRange(1L, 10L), Collections.<Frame>emptyList());
        Trace trace = Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);
        EndPointAnalysis analysis = analyzer.locateEndPoint(trace);
        assertNotNull("No analysis result", analysis);
        assertEquals("Mismatched example", op.getLabel(), analysis.getExample());
    }
View Full Code Here


                .type(operationType.getOperationType())
                .label(getClass().getSimpleName() + "#generateIntegrationTestsHashes")
                .put("host", INTTEST_HOST)
                .put("port", INTTEST_PORT);

        final Frame TEST_FRAME = new SimpleFrame(FrameId.valueOf("7365"), null, BASE_OP, new TimeRange(1L, 10L), Collections.<Frame>emptyList());
        //final Trace TEST_TRACE = new Trace(ServerName.valueOf("7.3.6.5"), INTTEST_APP, new Date(System.currentTimeMillis()), TraceId.valueOf("3777347"), TEST_FRAME);
        final ColorManager colorManager = ColorManager.getInstance();

        for (DestinationType destType : DestinationType.values()) {
            String destName = DESTS_NAMES.get(destType);
View Full Code Here

        if (ListUtil.size(frames) <= 0) {
            return Collections.emptyList();
        }

        Collection<MetricsBag> mbList = null;
        TimeRange traceRange = trace.getRange();
        for (Frame frame : frames) {
            Operation op = frame.getOperation();
            String actionName = op.get(EclipsePersistenceDefinitions.ACTION_ATTR, String.class);
            if (StringUtil.isEmpty(actionName)) {
                continue;
View Full Code Here

        // we do NOT want metrics to be generated on the endpoint
    }

    @Test
    public void testExtraMetricsGeneration() {
        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();
View Full Code Here

        }

        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
        OperationMap response = op.get("response", OperationMap.class);
        Number contentSize = (response == null) ? null : response.get("contentSize", Number.class);
View Full Code Here

TOP

Related Classes of com.springsource.insight.util.time.TimeRange

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.