Package org.jboss.profiler.tracerModel

Examples of org.jboss.profiler.tracerModel.JBTMethod


            // ignore as it hasn't come the time yet where a method was filtered
            return;
        }

        // need to get the latest method on the stack
        JBTMethod method = (JBTMethod)currentTransaction.getMethods().get(currentTransaction.getMethods().size()-1);

        if (register.getContendedType()==SpyRegisterContended.CONTENDED_ENTER)
        {
            method.setLockEnter(register.getTime_t());
            method.setNumberOfLocks(method.getNumberOfLocks()+1);
            currentTransaction.setNumberOfLocks(currentTransaction.getNumberOfLocks()+1);
        }
        else
        {
            System.out.println("A lock was processed");
            method.setLockEntered(register.getTime_t());
            if (method.getLockEnter()!=Long.MAX_VALUE)
            {
                method.setLockTime(method.getLockTime() + (method.getLockEntered()-method.getLockEnter()));
                currentTransaction.setLockTime(currentTransaction.getLockTime() + (method.getLockEntered()-method.getLockEnter()));
            }
            method.setLockEnter(Long.MAX_VALUE);
            method.setLockEntered(Long.MAX_VALUE);
        }
    }
View Full Code Here


            {
                incompleteTransactions.put(currentTransaction, currentTransaction);
                currentTransactions.remove(new Integer(register.getThreadId()));
            } */

            JBTMethod newMethod = new JBTMethod();
            newMethod.setDataStart(register);
            newMethod.setDepth(1);

            ArrayList methodsList = new ArrayList();
            methodsList.add(newMethod);

            currentTransaction = new JBTTransaction();
            transactionID += 1;
            currentTransaction.setTransactionID(transactionID);
            currentTransaction.setMethods(methodsList);
            currentTransaction.setCurrentMethod(methodsList.size() - 1);
            currentTransaction.setCurrentDepth(1);
            currentTransactions.put(new Integer(register.getThreadId()), currentTransaction);
        }

        else
        {
            if (currentTransaction != null)
            {
                JBTMethod newMethod = new JBTMethod();
                newMethod.setDataStart(register);
                newMethod.setDepth(currentTransaction.getCurrentDepth() + 1);

                ArrayList methodsList = currentTransaction.getMethods();
                methodsList.add(newMethod);
                currentTransaction.setTransactionID(currentTransaction.getTransactionID());
                currentTransaction.setMethods(methodsList);
                currentTransaction.setCurrentMethod(methodsList.size() - 1);
                currentTransaction.setCurrentDepth(newMethod.getDepth());
                currentTransactions.put(new Integer(register.getThreadId()), currentTransaction);
            }
        }
    }
View Full Code Here

                = (JBTTransaction) currentTransactions.get(new Integer(register.getThreadId()));

        if (currentTransaction != null)
        {
            ArrayList methodsList = currentTransaction.getMethods();
            JBTMethod currentMethod = (JBTMethod) methodsList.get(currentTransaction.getCurrentMethod());

            if (register.getMethodId() == currentMethod.getMethodID())
            {
                currentMethod.setDataEnd(register);

                methodsList.set(currentTransaction.getCurrentMethod(), currentMethod);
                currentTransaction.setCurrentDepth(currentTransaction.getCurrentDepth() - 1);

                if (register.getMethodId() == targetMethodID && currentMethod.getDepth()==1)
                {
                    /*JBTTransaction completeTransaction = new JBTTransaction();
                    completeTransaction.setTransactionID(currentTransaction.getTransactionID());
                    completeTransaction.setMethods(methodsList); */
                    completeTransactions.put(currentTransaction, currentTransaction);

                    currentTransactions.remove(new Integer(register.getThreadId()));
                } else
                {
                    currentTransaction.setTransactionID(currentTransaction.getTransactionID());
                    currentTransaction.setMethods(methodsList); //?????

                    loop:
                    for (int i = currentTransaction.getCurrentMethod(); i >= 0; i--)
                    {
                        if (((JBTMethod) currentTransaction.getMethods().get(i)).getDepth()
                                == (currentMethod.getDepth() - 1))
                        {
                            currentTransaction.setCurrentMethod(i);
                            break loop;
                        }
                    }
View Full Code Here

TOP

Related Classes of org.jboss.profiler.tracerModel.JBTMethod

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.