Package com.sun.sgs.profile

Examples of com.sun.sgs.profile.ProfileCollector


        }
    }
   
   @Test(expected=IllegalArgumentException.class)
    public void testCounterIncrementValueBad() throws Exception {
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        final ProfileCounter counter =
                cons1.createCounter("my counter",
                                    testType, ProfileLevel.MIN);
       
        counter.incrementCount(-1);
View Full Code Here


      
    @Test
    public void testCounterIncrementValue() throws Exception {
        final String name = "counter";
        final int incValue = 5;
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        // Register a counter to be noted at all profiling levels
        final ProfileCounter counter =
                cons1.createCounter(name, testType, ProfileLevel.MIN);

        // Because the listener is running in a different thread, JUnit
View Full Code Here

   
    @Test
    public void testCounterIncrementMultiple() throws Exception {
        final String name = "counterforstuff";
        final int incValue = 3;
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        // Register a counter to be noted at all profiling levels
        final ProfileCounter counter =
                cons1.createCounter(name, testType, ProfileLevel.MIN);
       
        // Because the listener is running in a different thread, JUnit
View Full Code Here

   
    @Test
    public void testCounterIncrementValueMultiple() throws Exception {
        final String name = "counterforstuff";
        final int incValue = 5;
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        // Register a counter to be noted at all profiling levels
        final ProfileCounter counter =
                cons1.createCounter(name, testType, ProfileLevel.MIN);
       
        // Because the listener is running in a different thread, JUnit
View Full Code Here

    }
   
    @Test
    public void testTaskCounterMultConsumer() throws Exception {
        final String name = "sharedName";
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        ProfileConsumer cons2 = collector.getConsumer("c2");
        final ProfileCounter counter1 =
                cons1.createCounter(name, testType, ProfileLevel.MIN);
        final ProfileCounter counter2 =
                cons2.createCounter(name, testType, ProfileLevel.MIN);
       
View Full Code Here

        }
    }
   
    @Test
    public void testOperation() throws Exception {
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        final ProfileOperation op =
                cons1.createOperation("something", testType, ProfileLevel.MIN);
       
        // Because the listener is running in a different thread, JUnit
        // is not able to report the assertions and failures.
View Full Code Here

        }
    }
       
    @Test
    public void testOperationMediumLevel() throws Exception {
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        final ProfileOperation op =
                cons1.createOperation("something", testType,
                                      ProfileLevel.MEDIUM);
       
        // Because the listener is running in a different thread, JUnit
View Full Code Here

        }
    }
   
    @Test
    public void testOperationMediumToMaxLevel() throws Exception {
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        final ProfileOperation op =
            cons1.createOperation("something", testType,ProfileLevel.MEDIUM);
       
        // Because the listener is running in a different thread, JUnit
        // is not able to report the assertions and failures.
View Full Code Here

        }
    }
   
    @Test
    public void testOperationMaxLevel() throws Exception {
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        final ProfileOperation op =
                cons1.createOperation("something", testType, ProfileLevel.MAX);
       
        // Because the listener is running in a different thread, JUnit
        // is not able to report the assertions and failures.
View Full Code Here

   
    @Test
    public void testOperationMultiple() throws Exception {
        final String opName = "something";
        final String op1Name = "else";
        ProfileCollector collector = getCollector(serverNode);
        ProfileConsumer cons1 = collector.getConsumer("c1");
        final ProfileOperation op =
                cons1.createOperation(opName, testType, ProfileLevel.MIN);
        final ProfileOperation op1 =
                cons1.createOperation(op1Name, testType, ProfileLevel.MIN);
       
View Full Code Here

TOP

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

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.