test.TestNameTable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aalto-xml Show documentation
Show all versions of aalto-xml Show documentation
Ultra-high performance non-blocking XML processor (Stax/Stax2, SAX/SAX2)
package test;
import java.io.*;
import com.fasterxml.aalto.in.*;
public final class TestNameTable
extends BasePerfTest
{
final byte[] mBuffer = new byte[4000];
final ByteBasedPNameTable mTable = new ByteBasedPNameTable(128);
protected TestNameTable() { }
@Override
protected int testExec(File file)
throws Exception
{
int total = 0;
InputStream in = new FileInputStream(file);
int count;
byte[] buf = mBuffer;
while ((count = in.read(buf)) > 0) {
for (int i = 0; i < count; ++i) {
total += buf[i];
}
}
in.close();
return total;
}
public static void main(String[] args)
throws Exception
{
new TestNameTable().test(args);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy