/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*
*/
/**
* Benchmark for testing speed of writes and reads of a tree of Externalizable
* objects.
*/
boolean z;
byte b;
char c;
short s;
int i;
float f;
long j;
double d;
if (depth > 0) {
}
}
public Node() {
}
out.writeBoolean(z);
out.writeShort(s);
out.writeFloat(f);
out.writeDouble(d);
}
throws IOException, ClassNotFoundException
{
z = in.readBoolean();
d = in.readDouble();
}
}
/**
* Write and read a tree of externalizable objects from a stream. The
* benchmark is run in batches: each "batch" consists of a fixed number of
* buffer cleared) in between each batch.
* Arguments: <tree depth> <# batches> <# cycles per batch>
*/
}
/**
* Generate object trees.
*/
for (int i = 0; i < ntrees; i++) {
}
return trees;
}
/**
* Run benchmark for given number of batches, with each batch containing
* the given number of cycles.
*/
throws Exception
{
for (int i = 0; i < nbatches; i++) {
for (int j = 0; j < ncycles; j++) {
}
for (int j = 0; j < ncycles; j++) {
oin.readObject();
}
}
}
}