コード例 #1
0
 public String getExpectedStatistics(Configuration config) {
   long objSize = AProfSizeUtil.getObjectSize(new Entity[LENGTH]);
   return TestUtil.fmt(
       "{class}$Entity[]: {size} bytes in {count} objects (avg size {objSize} bytes)\n"
           + "\t{class}.doTest: {size} bytes in {count} objects (avg size {objSize} bytes)\n",
       "class=" + getClass().getName(),
       "size=" + TestUtil.fmt(objSize * COUNT),
       "count=" + TestUtil.fmt(COUNT),
       "objSize=" + objSize);
 }
コード例 #2
0
ファイル: IntegerTest.java プロジェクト: nevgeniev/aprof-1
 public String getExpectedStatistics() {
   long objSize = AProfSizeUtil.getObjectSize(new Integer(0));
   return TestUtil.fmt(
       "java.lang.Integer: {size} bytes in {count} objects (avg size {objSize} bytes)\n"
           + "\tjava.lang.Integer.valueOf: {size} bytes in {count} objects\n"
           + "\t\t{class}.doTest: {size} bytes in {count} objects\n",
       "class=" + getClass().getName(),
       "size=" + TestUtil.fmt(objSize * COUNT),
       "count=" + TestUtil.fmt(COUNT),
       "objSize=" + objSize);
 }