Package com.sun.sgs.profile

Examples of com.sun.sgs.profile.ProfileConsumer.createOperation()


        {
            ProfileOperation op1 =
                cons1.createOperation(name,
                                      ProfileDataType.TASK, ProfileLevel.MAX);
            ProfileOperation op2 =
                cons2.createOperation(name,
                                      ProfileDataType.TASK, ProfileLevel.MAX);
            assertFalse(op1.getName().equals(op2.getName()));
            assertTrue(op1.getName().contains(name));
            assertTrue(op2.getName().contains(name));
        }
View Full Code Here


        {
            ProfileOperation op1 =
                cons1.createOperation(name, ProfileDataType.AGGREGATE,
                                      ProfileLevel.MAX);
            ProfileOperation op2 =
                cons2.createOperation(name, ProfileDataType.AGGREGATE,
                                      ProfileLevel.MAX);
            assertFalse(op1.getName().equals(op2.getName()));
            assertTrue(op1.getName().contains(name));
            assertTrue(op2.getName().contains(name));
        }
View Full Code Here

        {
            ProfileOperation op1 =
                cons1.createOperation(name, ProfileDataType.TASK_AND_AGGREGATE,
                                      ProfileLevel.MAX);
            ProfileOperation op2 =
                cons2.createOperation(name, ProfileDataType.TASK_AND_AGGREGATE,
                                      ProfileLevel.MAX);
            assertFalse(op1.getName().equals(op2.getName()));
            assertTrue(op1.getName().contains(name));
            assertTrue(op2.getName().contains(name));
        }
View Full Code Here

    public void testOperationTwice() throws Exception {
        final String name = "myOperation";
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        ProfileOperation op1 =
                cons1.createOperation(name,
                                      ProfileDataType.TASK, ProfileLevel.MAX);

        // Try creating with same name and parameters
        ProfileOperation op2 =
                cons1.createOperation(name,
View Full Code Here

                cons1.createOperation(name,
                                      ProfileDataType.TASK, ProfileLevel.MAX);

        // Try creating with same name and parameters
        ProfileOperation op2 =
                cons1.createOperation(name,
                                      ProfileDataType.TASK, ProfileLevel.MAX);
        assertSame(op1, op2);
       
        // Try creating with same name and different parameters
        try {
View Full Code Here

        assertSame(op1, op2);
       
        // Try creating with same name and different parameters
        try {
            ProfileOperation op3 =
                cons1.createOperation(name,
                                      ProfileDataType.AGGREGATE,
                                      ProfileLevel.MAX);
            fail("Expected IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
            System.err.println(expected);
View Full Code Here

        } catch (IllegalArgumentException expected) {
            System.err.println(expected);
        }
        try {
            ProfileOperation op3 =
                cons1.createOperation(name,
                                      ProfileDataType.TASK_AND_AGGREGATE,
                                      ProfileLevel.MAX);
            fail("Expected IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
            System.err.println(expected);
View Full Code Here

        } catch (IllegalArgumentException expected) {
            System.err.println(expected);
        }
        try {
            ProfileOperation op3 =
                cons1.createOperation(name, ProfileDataType.TASK,
                                      ProfileLevel.MIN);
            fail("Expected IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
            System.err.println(expected);
        }
View Full Code Here

        } catch (IllegalArgumentException expected) {
            System.err.println(expected);
        }
        try {
            ProfileOperation op3 =
                cons1.createOperation(name, ProfileDataType.TASK,
                                      ProfileLevel.MEDIUM);
            fail("Expected IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
            System.err.println(expected);
        }
View Full Code Here

            System.err.println(expected);
        }
       
        // Try creating with a different name
        ProfileOperation op4 =
                cons1.createOperation("somethingelse",
                                      ProfileDataType.TASK, ProfileLevel.MAX);
        assertNotSame(op1, op4);
    }
   
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.