Authentication
API v8.1 SP2

com.rsa.ace.techservice.util
Class AceStats

java.lang.Object
  extended by com.rsa.ace.techservice.util.AceStats

public class AceStats
extends java.lang.Object

Performance statistics gathering class.

This class can be used to gather throughput statistics and to calculate averages. It maintains an array of the most recently calculated statistic results that can be used to obtain averages.


Constructor Summary
AceStats()
          Constructs a new instance of AceStats.
 
Method Summary
 void appendAverage(java.io.PrintStream ps, java.lang.String title, java.lang.String numerator)
          Appends the average rate output string to the print stream provided.
 void appendRate(java.io.PrintStream ps, java.lang.String title, int units, java.lang.String numerator)
          Appends the rate output string to the print stream provided.
 java.lang.String averageString(java.lang.String title, java.lang.String numerator)
          Creates a string for the average rate data.
 double avgRatePerSecond()
          Calculated the average rate for recent calls to this class.
 void clearAverageData()
          Clears the average rate data.
 void end()
          End a timer for statistics.
 void printAverage(java.lang.String title, java.lang.String numerator)
          Prints the average rate output string to standard output (System.out).
 void printRate(java.lang.String title, int units, java.lang.String numerator)
          Prints the rate output string to standard output.
 double ratePerSecond(int units)
          Calculates the rate-per-second for the number of units provided.
 java.lang.String rateString(java.lang.String title, int units, java.lang.String numerator)
          Creates a String in the format: : N <units> in M ms (Y <numberator>/second)</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/rsa/ace/techservice/util/AceStats.html#sampleSize()">sampleSize</A></B>()</CODE> <BR>           Provides the number of samples.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/rsa/ace/techservice/util/AceStats.html#start()">start</A></B>()</CODE> <BR>           Start a timer for statistics.</TD> </TR> </TABLE>  <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE>   <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="AceStats()"><!-- --></A><H3> AceStats</H3> <PRE> public <B>AceStats</B>()</PRE> <DL> <DD>Constructs a new instance of AceStats. <P> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="start()"><!-- --></A><H3> start</H3> <PRE> public void <B>start</B>()</PRE> <DL> <DD>Start a timer for statistics. This captures the start time and clears the end time. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="end()"><!-- --></A><H3> end</H3> <PRE> public void <B>end</B>()</PRE> <DL> <DD>End a timer for statistics. This captures the end time and calculates the elapsed time. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="ratePerSecond(int)"><!-- --></A><H3> ratePerSecond</H3> <PRE> public double <B>ratePerSecond</B>(int units)</PRE> <DL> <DD>Calculates the rate-per-second for the number of units provided. This method also captures the result into the history array for average processing. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>units</CODE> - The number of units processed for the time captured. <DT><B>Returns:</B><DD>The rate per second.</DL> </DD> </DL> <HR> <A NAME="rateString(java.lang.String, int, java.lang.String)"><!-- --></A><H3> rateString</H3> <PRE> public java.lang.String <B>rateString</B>(java.lang.String title, int units, java.lang.String numerator)</PRE> <DL> <DD>Creates a String in the format: <title>: N <units> in M ms (Y <numberator>/second) <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>Title</CODE> - Used to prefix the string message.<DD><CODE>units</CODE> - The number of units processed for the time captured.<DD><CODE>numerator</CODE> - The numerator for the string. <DT><B>Returns:</B><DD>A rate string.</DL> </DD> </DL> <HR> <A NAME="appendRate(java.io.PrintStream, java.lang.String, int, java.lang.String)"><!-- --></A><H3> appendRate</H3> <PRE> public void <B>appendRate</B>(java.io.PrintStream ps, java.lang.String title, int units, java.lang.String numerator)</PRE> <DL> <DD>Appends the rate output string to the print stream provided. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>ps</CODE> - The PrintStream to which the string will be printed.<DD><CODE>Title</CODE> - Used to prefix the string message.<DD><CODE>units</CODE> - The number of units processed for the time captured.<DD><CODE>numerator</CODE> - The numerator for the string.</DL> </DD> </DL> <HR> <A NAME="printRate(java.lang.String, int, java.lang.String)"><!-- --></A><H3> printRate</H3> <PRE> public void <B>printRate</B>(java.lang.String title, int units, java.lang.String numerator)</PRE> <DL> <DD>Prints the rate output string to standard output. The most commonly used method. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>Title</CODE> - Used to prefix the string message.<DD><CODE>units</CODE> - The number of units processed for the time captured.<DD><CODE>numerator</CODE> - The numerator for the string.</DL> </DD> </DL> <HR> <A NAME="avgRatePerSecond()"><!-- --></A><H3> avgRatePerSecond</H3> <PRE> public double <B>avgRatePerSecond</B>()</PRE> <DL> <DD>Calculated the average rate for recent calls to this class. <P> <DD><DL> <DT><B>Returns:</B><DD>The average rate for the last 'maxHistoryIndex' calls.</DL> </DD> </DL> <HR> <A NAME="clearAverageData()"><!-- --></A><H3> clearAverageData</H3> <PRE> public void <B>clearAverageData</B>()</PRE> <DL> <DD>Clears the average rate data. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="averageString(java.lang.String, java.lang.String)"><!-- --></A><H3> averageString</H3> <PRE> public java.lang.String <B>averageString</B>(java.lang.String title, java.lang.String numerator)</PRE> <DL> <DD>Creates a string for the average rate data. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>Title</CODE> - Used to prefix the string message.<DD><CODE>numerator</CODE> - The numerator for the string. <DT><B>Returns:</B><DD>A string with the format (for example): <p> <b>title</b> average: 45.6 <b>numerator</b>/second with 4 samples.</DL> </DD> </DL> <HR> <A NAME="appendAverage(java.io.PrintStream, java.lang.String, java.lang.String)"><!-- --></A><H3> appendAverage</H3> <PRE> public void <B>appendAverage</B>(java.io.PrintStream ps, java.lang.String title, java.lang.String numerator)</PRE> <DL> <DD>Appends the average rate output string to the print stream provided. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>ps</CODE> - The PrintStream to which the string will be printed.<DD><CODE>Title</CODE> - Used to prefix the string message.<DD><CODE>numerator</CODE> - The numerator for the string.</DL> </DD> </DL> <HR> <A NAME="printAverage(java.lang.String, java.lang.String)"><!-- --></A><H3> printAverage</H3> <PRE> public void <B>printAverage</B>(java.lang.String title, java.lang.String numerator)</PRE> <DL> <DD>Prints the average rate output string to standard output (System.out). <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>Title</CODE> - Used to prefix the string message.<DD><CODE>numerator</CODE> - The numerator for the string.</DL> </DD> </DL> <HR> <A NAME="sampleSize()"><!-- --></A><H3> sampleSize</H3> <PRE> public int <B>sampleSize</B>()</PRE> <DL> <DD>Provides the number of samples. Generally used to avoid showing samples of one. <P> <DD><DL> <DT><B>Returns:</B><DD>The number of samples gathered so far.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">  <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AceStats.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Authentication<br>API v8.1 SP2</br></b></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../com/rsa/ace/techservice/util/AceRandom.html" title="class in com.rsa.ace.techservice.util"><B>PREV CLASS</B></A>   NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/rsa/ace/techservice/util/AceStats.html" target="_top"><B>FRAMES</B></A>    <A HREF="AceStats.html" target="_top"><B>NO FRAMES</B></A>    <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright © 1999 - 2011 EMC Corporation. All Rights Reserved. </BODY> </HTML>