memorymonitortest.html

来自「基于mondrian 开源框架进行OLAP多维分析」· HTML 代码 · 共 519 行 · 第 1/3 页

HTML
519 行
字号
MemoryMonitorTest</H3><PRE>public <B>MemoryMonitorTest</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL></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="convertThresholdToPercentage(long, long)"><!-- --></A><H3>convertThresholdToPercentage</H3><PRE>protected static int <B>convertThresholdToPercentage</B>(long&nbsp;threshold,                                                  long&nbsp;maxMemory)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="causeGC(mondrian.util.MemoryMonitor)"><!-- --></A><H3>causeGC</H3><PRE>public boolean <B>causeGC</B>(<A HREF="../../mondrian/util/MemoryMonitor.html" title="interface in mondrian.util">MemoryMonitor</A>&nbsp;mm)</PRE><DL><DD>Get the difference between the maximum memory and the used memory and divide that by 1000. This is the size of allocation chunks. Keep allocating chunks until an <code>OutOfMemoryError</code> is created.<P><DD><DL></DL></DD></DL><HR><A NAME="setUp()"><!-- --></A><H3>setUp</H3><PRE>protected void <B>setUp</B>()              throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html#setUp()" title="class or interface in junit.framework">setUp</A></CODE> in class <CODE><A HREF="http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html" title="class or interface in junit.framework">TestCase</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE></DL></DD></DL><HR><A NAME="tearDown()"><!-- --></A><H3>tearDown</H3><PRE>protected void <B>tearDown</B>()                 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html#tearDown()" title="class or interface in junit.framework">tearDown</A></CODE> in class <CODE><A HREF="http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html" title="class or interface in junit.framework">TestCase</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE></DL></DD></DL><HR><A NAME="testDeltaUsage()"><!-- --></A><H3>testDeltaUsage</H3><PRE>public void <B>testDeltaUsage</B>()                    throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE></DL></DD></DL><HR><A NAME="_testQuery()"><!-- --></A><H3>_testQuery</H3><PRE>public void <B>_testQuery</B>()                throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD>Run this by itself and it works across 2 orders of magnitude. Run it with other tests and its hard to pick the right values for the percentage and how much to allocate for it to always work.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE></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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href="http://sourceforge.net/projects/mondrian"><img src="http://sourceforge.net/sflogo.php?group_id=35302&type=1" width="88" height="31" border="0" alt="SourceForge.net_Logo"></a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../mondrian/util/MemoryMonitorFactory.html" title="class in mondrian.util"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../mondrian/util/MemoryMonitorTest.TestMM.html" title="class in mondrian.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?mondrian/util/MemoryMonitorTest.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="MemoryMonitorTest.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?