Package com.sun.sgs.profile

Examples of com.sun.sgs.profile.ProfileSample


    @Test
    public void testSampleType() throws Exception {
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        ProfileSample s1 =
            cons1.createSample("samples1", ProfileDataType.TASK,
                               ProfileLevel.MAX);
        assertTrue(s1 instanceof TaskProfileSample);
        assertFalse(s1 instanceof AggregateProfileSample);
        ProfileSample s2 =
            cons1.createSample("samples2", ProfileDataType.AGGREGATE,
                               ProfileLevel.MAX);
        assertFalse(s2 instanceof TaskProfileSample);
        assertTrue(s2 instanceof AggregateProfileSample);
       
        ProfileSample s3 =
            cons1.createSample("samples3", ProfileDataType.TASK_AND_AGGREGATE,
                               ProfileLevel.MAX);
        assertTrue(s3 instanceof TaskProfileSample);
        assertTrue(s3 instanceof AggregateProfileSample);
    }
View Full Code Here

TOP

Related Classes of com.sun.sgs.profile.ProfileSample

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.