Package com.sun.sgs.profile

Examples of com.sun.sgs.profile.AggregateProfileCounter.incrementCount()


                    cons1.createCounter(name, testType, ProfileLevel.MIN);
       
        counter.incrementCount();
        assertEquals(1, counter.getCount());
       
        counter.incrementCount(4);
        assertEquals(5, counter.getCount());
       
        counter.clearCount();
        assertEquals(0, counter.getCount());
       
View Full Code Here


        assertEquals(5, counter.getCount());
       
        counter.clearCount();
        assertEquals(0, counter.getCount());
       
        counter.incrementCount(2);
        assertEquals(2, counter.getCount());
    }
  
   @Test
   public void testAggregateProfileOperation() throws Exception {
View Full Code Here

        // Register a counter to be noted at all profiling levels
        final AggregateProfileCounter counter =
                (AggregateProfileCounter)
                    cons1.createCounter(name, testType, ProfileLevel.MIN);
       
        counter.incrementCount();
        assertEquals(1, counter.getCount());
       
        counter.incrementCount(4);
        assertEquals(5, counter.getCount());
       
View Full Code Here

        // We don't expect to see the counter updated in the task report
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    counter.incrementCount();
                }
            }, negativeOwner);

        AssertionError error =
                errorExchanger.exchange(null, 100, TimeUnit.MILLISECONDS);
View Full Code Here

       
        // We expect to see the counter updated in the task report
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    counter.incrementCount();
                }
            }, positiveOwner);

        AssertionError error =
                errorExchanger.exchange(null, 100, TimeUnit.MILLISECONDS);
View Full Code Here

        // we're using the ErrorExchanger to ensure the profile report for
        // the above task has been seen.
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    counter.incrementCount();
                }
            }, positiveOwner);

        error = errorExchanger.exchange(null, 100, TimeUnit.MILLISECONDS);
        if (error != null) {
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.