use of org.terasology.benchmark.PrintToConsoleCallback in project Terasology by MovingBlocks.
the class EntitySystemBenchmark method main.
public static void main(String[] args) {
final List<Benchmark> benchmarks = Lists.newArrayList();
benchmarks.add(new EntityCreateBenchmark());
benchmarks.add(new IterateSingleComponentBenchmark());
benchmarks.add(new IterateMultipleComponentBenchmark());
Benchmarks.execute(benchmarks, new PrintToConsoleCallback());
}
use of org.terasology.benchmark.PrintToConsoleCallback in project Terasology by MovingBlocks.
the class ReflectFactoryBenchmark method main.
public static void main(String[] args) {
final List<Benchmark> benchmarks = Lists.newArrayList();
benchmarks.add(new FieldAccessBenchmark(new ReflectionReflectFactory()));
benchmarks.add(new FieldAccessBenchmark(new ByteCodeReflectFactory()));
benchmarks.add(new GetterSetterAccessBenchmark(new ReflectionReflectFactory()));
benchmarks.add(new GetterSetterAccessBenchmark(new ByteCodeReflectFactory()));
benchmarks.add(new ConstructionBenchmark(new ReflectionReflectFactory()));
benchmarks.add(new ConstructionBenchmark(new ByteCodeReflectFactory()));
Benchmarks.execute(benchmarks, new PrintToConsoleCallback());
}
use of org.terasology.benchmark.PrintToConsoleCallback in project Terasology by MovingBlocks.
the class TeraArraysBenchmark method main.
public static void main(String[] args) {
final List<Benchmark> benchmarks = new LinkedList<>();
benchmarks.add(new BenchmarkTeraArraySerializeObject(new TeraDenseArray8Bit.SerializationHandler(), new TeraDenseArray8Bit(16, 256, 16)));
benchmarks.add(new BenchmarkTeraArraySerializeToBuffer(new TeraDenseArray8Bit.SerializationHandler(), new TeraDenseArray8Bit(16, 256, 16)));
benchmarks.add(new BenchmarkTeraArraySerializeToByteString(new TeraDenseArray8Bit.SerializationHandler(), new TeraDenseArray8Bit(16, 256, 16)));
benchmarks.add(new BenchmarkTeraArraySerializeToStreamViaByteArray(new TeraDenseArray8Bit.SerializationHandler(), new TeraDenseArray8Bit(16, 256, 16)));
benchmarks.add(new BenchmarkTeraArraySerializeToStreamViaChannel(new TeraDenseArray8Bit.SerializationHandler(), new TeraDenseArray8Bit(16, 256, 16)));
// benchmarks.add(new BenchmarkTeraArrayDeserializeFromBuffer(new TeraDenseArray8Bit.SerializationHandler(), new TeraDenseArray8Bit(16, 256, 16)));
//
//
// benchmarks.add(new BenchmarkTeraArrayRead(new TeraDenseArray8Bit(16, 256, 16)));
// benchmarks.add(new BenchmarkTeraArrayRead(new TeraDenseArray4Bit(16, 256, 16)));
// benchmarks.add(new BenchmarkTeraArrayRead(new TeraSparseArray8Bit(16, 256, 16, INFLATED_8_BIT, DEFLATED_8_BIT)));
// benchmarks.add(new BenchmarkTeraArrayRead(new TeraSparseArray4Bit(16, 256, 16, INFLATED_4_BIT, DEFLATED_4_BIT)));
//
//
// benchmarks.add(new BenchmarkTeraArrayWrite(new TeraDenseArray8Bit(16, 256, 16)));
// benchmarks.add(new BenchmarkTeraArrayWrite(new TeraDenseArray4Bit(16, 256, 16)));
// benchmarks.add(new BenchmarkTeraArrayWrite(new TeraSparseArray8Bit(16, 256, 16, INFLATED_8_BIT, DEFLATED_8_BIT)));
// benchmarks.add(new BenchmarkTeraArrayWrite(new TeraSparseArray4Bit(16, 256, 16, INFLATED_4_BIT, DEFLATED_4_BIT)));
Benchmarks.execute(benchmarks, new PrintToConsoleCallback());
}
Aggregations