/Prototipo/Servlet/lib/xstream-distribution-1.4.1-bin/xstream-1.4.1/docs/benchmark-javadoc/com/thoughtworks/xstream/tools/benchmark/Metric.html

http://prototipomemoria.googlecode.com/ · HTML · 306 lines · 254 code · 32 blank · 20 comment · 0 complexity · 252ab4da111b6a93875e99165dd8de65 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_26) on Thu Aug 11 04:42:06 CEST 2011 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <TITLE>
  8. Metric (XStream Benchmark 1.4.1 API)
  9. </TITLE>
  10. <META NAME="date" CONTENT="2011-08-11">
  11. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
  12. <SCRIPT type="text/javascript">
  13. function windowTitle()
  14. {
  15. if (location.href.indexOf('is-external=true') == -1) {
  16. parent.document.title="Metric (XStream Benchmark 1.4.1 API)";
  17. }
  18. }
  19. </SCRIPT>
  20. <NOSCRIPT>
  21. </NOSCRIPT>
  22. </HEAD>
  23. <BODY BGCOLOR="white" onload="windowTitle();">
  24. <HR>
  25. <!-- ========= START OF TOP NAVBAR ======= -->
  26. <A NAME="navbar_top"><!-- --></A>
  27. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  28. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  29. <TR>
  30. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  31. <A NAME="navbar_top_firstrow"><!-- --></A>
  32. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  33. <TR ALIGN="center" VALIGN="top">
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  36. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Metric.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  40. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  41. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  42. </TR>
  43. </TABLE>
  44. </TD>
  45. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  46. </EM>
  47. </TD>
  48. </TR>
  49. <TR>
  50. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  51. &nbsp;<A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Harness.html" title="class in com.thoughtworks.xstream.tools.benchmark"><B>PREV CLASS</B></A>&nbsp;
  52. &nbsp;<A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Product.html" title="interface in com.thoughtworks.xstream.tools.benchmark"><B>NEXT CLASS</B></A></FONT></TD>
  53. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  54. <A HREF="../../../../../index.html?com/thoughtworks/xstream/tools/benchmark/Metric.html" target="_top"><B>FRAMES</B></A> &nbsp;
  55. &nbsp;<A HREF="Metric.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  56. &nbsp;<SCRIPT type="text/javascript">
  57. <!--
  58. if(window==top) {
  59. document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  60. }
  61. //-->
  62. </SCRIPT>
  63. <NOSCRIPT>
  64. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  65. </NOSCRIPT>
  66. </FONT></TD>
  67. </TR>
  68. <TR>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  71. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  72. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  73. </TR>
  74. </TABLE>
  75. <A NAME="skip-navbar_top"></A>
  76. <!-- ========= END OF TOP NAVBAR ========= -->
  77. <HR>
  78. <!-- ======== START OF CLASS DATA ======== -->
  79. <H2>
  80. <FONT SIZE="-1">
  81. com.thoughtworks.xstream.tools.benchmark</FONT>
  82. <BR>
  83. Interface Metric</H2>
  84. <DL>
  85. <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/metrics/CharacterCountMetric.html" title="class in com.thoughtworks.xstream.tools.benchmark.metrics">CharacterCountMetric</A>, <A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/metrics/DeserializationSpeedMetric.html" title="class in com.thoughtworks.xstream.tools.benchmark.metrics">DeserializationSpeedMetric</A>, <A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/metrics/SerializationSpeedMetric.html" title="class in com.thoughtworks.xstream.tools.benchmark.metrics">SerializationSpeedMetric</A>, <A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/metrics/SizeMetric.html" title="class in com.thoughtworks.xstream.tools.benchmark.metrics">SizeMetric</A></DD>
  86. </DL>
  87. <HR>
  88. <DL>
  89. <DT><PRE>public interface <B>Metric</B></DL>
  90. </PRE>
  91. <P>
  92. A metric is what's actually recorded. This provides a strategy
  93. for what to do with an object for a given product and should
  94. return a measurable result. For example it could serialize an
  95. object against a product and return how long it took to complete
  96. the operation.
  97. <P>
  98. <P>
  99. <DL>
  100. <DT><B>Author:</B></DT>
  101. <DD>Joe Walnes, J&ouml;rg Schaible</DD>
  102. <DT><B>See Also:</B><DD><A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Harness.html" title="class in com.thoughtworks.xstream.tools.benchmark"><CODE>Harness</CODE></A></DL>
  103. <HR>
  104. <P>
  105. <!-- ========== METHOD SUMMARY =========== -->
  106. <A NAME="method_summary"><!-- --></A>
  107. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  108. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  109. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  110. <B>Method Summary</B></FONT></TH>
  111. </TR>
  112. <TR BGCOLOR="white" CLASS="TableRowColor">
  113. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  114. <CODE>&nbsp;boolean</CODE></FONT></TD>
  115. <TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Metric.html#biggerIsBetter()">biggerIsBetter</A></B>()</CODE>
  116. <BR>
  117. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether a big result is better for this metric.</TD>
  118. </TR>
  119. <TR BGCOLOR="white" CLASS="TableRowColor">
  120. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  121. <CODE>&nbsp;double</CODE></FONT></TD>
  122. <TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Metric.html#run(com.thoughtworks.xstream.tools.benchmark.Product, java.lang.Object)">run</A></B>(<A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Product.html" title="interface in com.thoughtworks.xstream.tools.benchmark">Product</A>&nbsp;product,
  123. <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;object)</CODE>
  124. <BR>
  125. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 1.3</I></TD>
  126. </TR>
  127. <TR BGCOLOR="white" CLASS="TableRowColor">
  128. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  129. <CODE>&nbsp;double</CODE></FONT></TD>
  130. <TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Metric.html#run(com.thoughtworks.xstream.tools.benchmark.Product, com.thoughtworks.xstream.tools.benchmark.Target)">run</A></B>(<A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Product.html" title="interface in com.thoughtworks.xstream.tools.benchmark">Product</A>&nbsp;product,
  131. <A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Target.html" title="interface in com.thoughtworks.xstream.tools.benchmark">Target</A>&nbsp;target)</CODE>
  132. <BR>
  133. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run the test and produce a metric.</TD>
  134. </TR>
  135. <TR BGCOLOR="white" CLASS="TableRowColor">
  136. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  137. <CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  138. <TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Metric.html#unit()">unit</A></B>()</CODE>
  139. <BR>
  140. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The unit the metric is recorded in (for reporting purposes).</TD>
  141. </TR>
  142. </TABLE>
  143. &nbsp;
  144. <P>
  145. <!-- ============ METHOD DETAIL ========== -->
  146. <A NAME="method_detail"><!-- --></A>
  147. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  148. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  149. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  150. <B>Method Detail</B></FONT></TH>
  151. </TR>
  152. </TABLE>
  153. <A NAME="run(com.thoughtworks.xstream.tools.benchmark.Product, java.lang.Object)"><!-- --></A><H3>
  154. run</H3>
  155. <PRE>
  156. double <B>run</B>(<A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Product.html" title="interface in com.thoughtworks.xstream.tools.benchmark">Product</A>&nbsp;product,
  157. <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;object)
  158. throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
  159. <DL>
  160. <DD><B>Deprecated.</B>&nbsp;<I>since 1.3</I>
  161. <P>
  162. <DD>Run the test and produce a metric.
  163. <P>
  164. <DD><DL>
  165. <DT><B>Parameters:</B><DD><CODE>product</CODE> - Product to use in test.<DD><CODE>object</CODE> - A object to use against the product.
  166. <DT><B>Returns:</B><DD>The resulting metric (e.g. 12.22).
  167. <DT><B>Throws:</B>
  168. <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE> - If this metric could not be obtained. This will
  169. be reported back to the <A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Reporter.html" title="interface in com.thoughtworks.xstream.tools.benchmark"><CODE>Reporter</CODE></A>.</DL>
  170. </DD>
  171. </DL>
  172. <HR>
  173. <A NAME="run(com.thoughtworks.xstream.tools.benchmark.Product, com.thoughtworks.xstream.tools.benchmark.Target)"><!-- --></A><H3>
  174. run</H3>
  175. <PRE>
  176. double <B>run</B>(<A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Product.html" title="interface in com.thoughtworks.xstream.tools.benchmark">Product</A>&nbsp;product,
  177. <A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Target.html" title="interface in com.thoughtworks.xstream.tools.benchmark">Target</A>&nbsp;target)
  178. throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
  179. <DL>
  180. <DD>Run the test and produce a metric.
  181. <P>
  182. <DD><DL>
  183. <DT><B>Parameters:</B><DD><CODE>product</CODE> - Product to use in test.<DD><CODE>target</CODE> - A target to use against the product.
  184. <DT><B>Returns:</B><DD>The resulting metric (e.g. 12.22).
  185. <DT><B>Throws:</B>
  186. <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE> - If this metric could not be obtained. This will
  187. be reported back to the <A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Reporter.html" title="interface in com.thoughtworks.xstream.tools.benchmark"><CODE>Reporter</CODE></A>.<DT><B>Since:</B></DT>
  188. <DD>1.3</DD>
  189. </DL>
  190. </DD>
  191. </DL>
  192. <HR>
  193. <A NAME="unit()"><!-- --></A><H3>
  194. unit</H3>
  195. <PRE>
  196. <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>unit</B>()</PRE>
  197. <DL>
  198. <DD>The unit the metric is recorded in (for reporting purposes).
  199. e.g. "ms" or "bytes".
  200. <P>
  201. <DD><DL>
  202. </DL>
  203. </DD>
  204. </DL>
  205. <HR>
  206. <A NAME="biggerIsBetter()"><!-- --></A><H3>
  207. biggerIsBetter</H3>
  208. <PRE>
  209. boolean <B>biggerIsBetter</B>()</PRE>
  210. <DL>
  211. <DD>Whether a big result is better for this metric.
  212. <P>
  213. <DD><DL>
  214. </DL>
  215. </DD>
  216. </DL>
  217. <!-- ========= END OF CLASS DATA ========= -->
  218. <HR>
  219. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  220. <A NAME="navbar_bottom"><!-- --></A>
  221. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  222. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  223. <TR>
  224. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  225. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  226. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  227. <TR ALIGN="center" VALIGN="top">
  228. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  229. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  230. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  231. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Metric.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  232. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  233. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  234. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  235. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  236. </TR>
  237. </TABLE>
  238. </TD>
  239. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  240. </EM>
  241. </TD>
  242. </TR>
  243. <TR>
  244. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  245. &nbsp;<A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Harness.html" title="class in com.thoughtworks.xstream.tools.benchmark"><B>PREV CLASS</B></A>&nbsp;
  246. &nbsp;<A HREF="../../../../../com/thoughtworks/xstream/tools/benchmark/Product.html" title="interface in com.thoughtworks.xstream.tools.benchmark"><B>NEXT CLASS</B></A></FONT></TD>
  247. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  248. <A HREF="../../../../../index.html?com/thoughtworks/xstream/tools/benchmark/Metric.html" target="_top"><B>FRAMES</B></A> &nbsp;
  249. &nbsp;<A HREF="Metric.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  250. &nbsp;<SCRIPT type="text/javascript">
  251. <!--
  252. if(window==top) {
  253. document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  254. }
  255. //-->
  256. </SCRIPT>
  257. <NOSCRIPT>
  258. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  259. </NOSCRIPT>
  260. </FONT></TD>
  261. </TR>
  262. <TR>
  263. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  264. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  265. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  266. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  267. </TR>
  268. </TABLE>
  269. <A NAME="skip-navbar_bottom"></A>
  270. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  271. <HR>
  272. Copyright &#169; 2004-2011 <a href="http://xstream.codehaus.org">XStream</a>. All Rights Reserved.
  273. </BODY>
  274. </HTML>