Package com.sun.sgs.profile

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


        // We run with the myOwner because we expect to see the
        // value in the test report.
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    counter.incrementCount();
                }
            }, positiveOwner);

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


        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    // The default profile level is MIN so we don't expect
                    // to see the counter incremented.
                    counter.incrementCount();
                }
            }, negativeOwner);

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

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    // Because we bumped the consumer's profile level,
                    // we expect the counter
                    counter.incrementCount();
                }
            }, positiveOwner);
           
        error =
            errorExchanger.exchange(null, TIMEOUT, TimeUnit.MILLISECONDS);
View Full Code Here

        ProfileConsumer cons1 = collector.getConsumer("c1");
        final ProfileCounter counter =
                cons1.createCounter("my counter",
                                    testType, ProfileLevel.MIN);
       
        counter.incrementCount(-1);
    }
      
    @Test
    public void testCounterIncrementValue() throws Exception {
        final String name = "counter";
View Full Code Here

        profileCollector.addListener(test, true);

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    counter.incrementCount(incValue);
                }
            }, positiveOwner);

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

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    for (int i = 0; i < incValue; i++) {
                        counter.incrementCount();
                    }
                }
            }, positiveOwner);

        AssertionError error =
View Full Code Here

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    // We expect to see the counter incremented by 5 total
                    counter.incrementCount(2);
                    counter.incrementCount(3);
                }
            }, positiveOwner);

        AssertionError error =
View Full Code Here

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    // We expect to see the counter incremented by 5 total
                    counter.incrementCount(2);
                    counter.incrementCount(3);
                }
            }, positiveOwner);

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

       
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    counter1.incrementCount();
                    counter2.incrementCount();
                    counter1.incrementCount();
                }
            }, myOwner);
           
        AssertionError error =
View Full Code Here

        ProfileConsumer cons1 = collector.getConsumer("c1");
        final ProfileCounter counter =
                cons1.createCounter("my counter",
                                    ProfileDataType.TASK, ProfileLevel.MIN);
       
        counter.incrementCount();
    }
   
    @Test(expected=IllegalStateException.class)
    public void testTaskCounterIncrementValueNoTransaction() throws Exception {
        ProfileCollector collector = getCollector(serverNode);
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.