Package com.sun.sgs.profile

Examples of com.sun.sgs.profile.ProfileOperation.report()


    /** {@inheritDoc} */
    public byte[] getObject(Transaction txn, long oid, boolean forUpdate) {
  byte[] result = dataStore.getObject(txn, oid, forUpdate);
  ProfileOperation op =
                forUpdate ? stats.getObjectForUpdateOp : stats.getObjectOp;
  op.report();
  stats.readBytesCounter.incrementCount(result.length);
  stats.readObjectsCounter.incrementCount();
  stats.readBytesSample.addSample(result.length);
  return result;
    }
View Full Code Here


        profileCollector.addListener(test, true);

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    op.report();
                }
            }, positiveOwner);

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

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    // We do not expect to see this reported.
                    op.report();
                }
            }, negativeOwner);

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

        cons1.setProfileLevel(ProfileLevel.MEDIUM);
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    op.report();
                }
            }, positiveOwner);
           
        error =
            errorExchanger.exchange(null, TIMEOUT, TimeUnit.MILLISECONDS);
View Full Code Here

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    // We do not expect to see this reported.
                    op.report();
                }
            }, negativeOwner);

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

    /** {@inheritDoc} */
    public byte[] getObject(Transaction txn, long oid, boolean forUpdate) {
  byte[] result = dataStore.getObject(txn, oid, forUpdate);
  ProfileOperation op =
                forUpdate ? stats.getObjectForUpdateOp : stats.getObjectOp;
  op.report();
  stats.readBytesCounter.incrementCount(result.length);
  stats.readObjectsCounter.incrementCount();
  stats.readBytesSample.addSample(result.length);
  return result;
    }
View Full Code Here

        cons1.setProfileLevel(ProfileLevel.MAX);
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    op.report();
                }
            }, positiveOwner);
           
        error = errorExchanger.exchange(null, TIMEOUT, TimeUnit.MILLISECONDS);
        if (error != null) {
View Full Code Here

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    // We do not expect to see this reported.
                    op.report();
                }
            }, negativeOwner);

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

        cons1.setProfileLevel(ProfileLevel.MEDIUM);
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    // No report expected:  the level is still too low
                    op.report();
                }
            }, negativeOwner);
           
        error = errorExchanger.exchange(null, TIMEOUT, TimeUnit.MILLISECONDS);
        if (error != null) {
View Full Code Here

       
        cons1.setProfileLevel(ProfileLevel.MAX);
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
    public void run() {
                    op.report();
                }
            }, positiveOwner);
           
        error = errorExchanger.exchange(null, TIMEOUT, 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.