Examples of RequestLogs


Examples of com.google.appengine.api.log.RequestLogs

    }

    @Test
    @InSequence(20)
    public void testIsFinishedCurrentRequest() throws Exception {
        RequestLogs logs = getCurrentRequestLogs();
        assertNotNull(logs);
        assertFalse(logs.isFinished());
    }
View Full Code Here

Examples of com.google.appengine.api.log.RequestLogs

     * These could return different values from the implementations so just assert the basics.
     */
    @Test
    @InSequence(20)
    public void testMiscProperties() throws Exception {
        RequestLogs logs = getRequestLogs1();

        assertNotNull("App Engine Release, e.g. 1.8.0, or empty string.", logs.getAppEngineRelease());
        assertTrue("Estimated cost of this request, in dollars.", logs.getCost() >= 0.0);
        assertTrue("Time required to process this request in microseconds.", logs.getLatencyUsec() >= 0);
        assertTrue("Microseconds request spent in pending request queue, if was pending at all.", logs.getPendingTimeUsec() >= 0);
        assertFalse("This should never be a loading request: " + logs.toString(), logs.isLoadingRequest());

        String appId = SystemProperty.applicationId.get()// appIds have a prefix according to datacenter.
        assertTrue("The application ID that handled this request.", logs.getAppId().endsWith(appId));

        long cycles = logs.getMcycles();
        assertTrue("Number of machine cycles used to process this request: " + cycles, cycles >= 0);

        String getOffsetMsg = "Base64-encoded offset used with subsequent LogQuery to continue reading logs at the point in time immediately following this request.";
        assertNotNull(getOffsetMsg, logs.getOffset());
        assertTrue("Should be Base64: " + logs.getOffset(), Base64.isBase64(logs.getOffset().getBytes()));

        String mapEntryMsg = "File or class within the URL mapping used for this request: " + logs.getUrlMapEntry();
        assertNotNull(mapEntryMsg, logs.getUrlMapEntry());
    }
View Full Code Here

Examples of com.google.appengine.api.log.RequestLogs

        LogQuery query = new LogQuery().startTimeMillis(System.currentTimeMillis() - 60000);
        Iterator<RequestLogs> iterator = findLogLine(query, 3);

        Long previousEndTimeUsec = null;
        while (iterator.hasNext()) {
            RequestLogs requestLogs = iterator.next();
            long endTimeUsec = requestLogs.getEndTimeUsec();
            if (previousEndTimeUsec != null) {
                assertTrue(
                    "RequestLogs with endTimeUsec " + endTimeUsec + " was returned after RequestLogs with endTimeUsec " + previousEndTimeUsec,
                    previousEndTimeUsec >= endTimeUsec);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.