psdi.server

Class PerformanceStats

  • java.lang.Object
    • psdi.server.PerformanceStats


  • public class PerformanceStats
    extends java.lang.Object
    Holds business object performance statistics. Individual instances of this class can be constructed for each transaction and saved into a global list by calling the static put() method.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PerformanceStats() 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addStackTrace(java.lang.String stm, java.lang.Object obj)
      Adding Exception to the hashmap
      static void disable()
      Disable the capturing of performance stats
      java.lang.String display(java.lang.String stmt) 
      static void enable()
      Enable the capturing of stats.
      static PerformanceStats get(java.lang.Object trans)
      Easy way to get the performance stat for the specified key (transaction name)
      static java.util.Iterator getList()
      Return an iterator that can be used to traverse the list of transactions.
      long getMboCount()
      Return the number of mbos created
      long getMboSetCount()
      Return the number of mbosets created
      java.lang.String getMboSetString()
      Return a comma seperated string of Mbos and their count
      java.lang.String getMboString()
      Return a comma seperated string of Mbos and their count
      long getSQLCount()
      Return the number of statements executed
      java.util.Iterator getSQLStatements()
      Return an iterator that can be used to traverse the list of sql statements.
      long getSQLTime()
      Returns the total time spent executong SQL statements
      int getStatementCount(java.lang.Object obj)
      Get the count of the statement, given the statement string
      java.lang.String getStatementIndividualTime(java.lang.Object obj)
      Get the count of the statement, given the statement string
      boolean hasValue()
      Returns true if system was able to gather the statistics gathered by this object
      void incrementMboCount()
      Increment the number if mbos created
      void incrementMboCount(java.lang.String name)
      Increment the mbo count for the specified mbo
      void incrementMboSetCount()
      Increment the number if mbosets created
      void incrementMboSetCount(java.lang.String name)
      Increment the mbo count for the specified mbo
      void incrementSQLCount()
      Adds one to the executed SQL statement count.
      void incrementSQLCount(java.lang.String stmt)
      Adds one to the executed SQL statement count and logs the statement
      void incrementSQLTime(long t)
      Adds the specified amount of time to the timer used to accumulate time spent on SQL statements
      static boolean isEnabled()
      Is the capturing of stats enabled ?
      java.util.Vector normalizeStackTrace(java.lang.Throwable e)
      Normalizing Stack Trace and adding part of vector and creating vector object
      static void put(java.lang.String trans, PerformanceStats ps)
      Add a object to the collection of performance stats being collected for this session.
      static void reset()
      Reset the list of transactions and associated performance stats
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PerformanceStats

        public PerformanceStats()
    • Method Detail

      • put

        public static void put(java.lang.String trans,
                               PerformanceStats ps)
        Add a object to the collection of performance stats being collected for this session.
      • getList

        public static java.util.Iterator getList()
        Return an iterator that can be used to traverse the list of transactions.
      • get

        public static PerformanceStats get(java.lang.Object trans)
        Easy way to get the performance stat for the specified key (transaction name)
      • reset

        public static void reset()
        Reset the list of transactions and associated performance stats
      • enable

        public static void enable()
        Enable the capturing of stats. Default is enabled unless a call to disable() is made
      • disable

        public static void disable()
        Disable the capturing of performance stats
      • isEnabled

        public static boolean isEnabled()
        Is the capturing of stats enabled ?
      • incrementSQLTime

        public void incrementSQLTime(long t)
        Adds the specified amount of time to the timer used to accumulate time spent on SQL statements
      • incrementSQLCount

        public void incrementSQLCount()
        Adds one to the executed SQL statement count.
      • incrementSQLCount

        public void incrementSQLCount(java.lang.String stmt)
        Adds one to the executed SQL statement count and logs the statement
      • getSQLStatements

        public java.util.Iterator getSQLStatements()
        Return an iterator that can be used to traverse the list of sql statements.
      • getStatementIndividualTime

        public java.lang.String getStatementIndividualTime(java.lang.Object obj)
        Get the count of the statement, given the statement string
      • getStatementCount

        public int getStatementCount(java.lang.Object obj)
        Get the count of the statement, given the statement string
      • getSQLCount

        public long getSQLCount()
        Return the number of statements executed
      • getSQLTime

        public long getSQLTime()
        Returns the total time spent executong SQL statements
      • incrementMboCount

        public void incrementMboCount()
        Increment the number if mbos created
      • incrementMboCount

        public void incrementMboCount(java.lang.String name)
        Increment the mbo count for the specified mbo
      • getMboString

        public java.lang.String getMboString()
        Return a comma seperated string of Mbos and their count
      • getMboCount

        public long getMboCount()
        Return the number of mbos created
      • incrementMboSetCount

        public void incrementMboSetCount()
        Increment the number if mbosets created
      • incrementMboSetCount

        public void incrementMboSetCount(java.lang.String name)
        Increment the mbo count for the specified mbo
      • getMboSetString

        public java.lang.String getMboSetString()
        Return a comma seperated string of Mbos and their count
      • getMboSetCount

        public long getMboSetCount()
        Return the number of mbosets created
      • hasValue

        public boolean hasValue()
        Returns true if system was able to gather the statistics gathered by this object
      • addStackTrace

        public void addStackTrace(java.lang.String stm,
                                  java.lang.Object obj)
        Adding Exception to the hashmap
      • normalizeStackTrace

        public java.util.Vector normalizeStackTrace(java.lang.Throwable e)
        Normalizing Stack Trace and adding part of vector and creating vector object
      • display

        public java.lang.String display(java.lang.String stmt)