Search in sources :

Example 1 with ByteCodeReflectFactory

use of org.terasology.reflection.reflect.ByteCodeReflectFactory 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());
}
Also used : ReflectionReflectFactory(org.terasology.reflection.reflect.ReflectionReflectFactory) ByteCodeReflectFactory(org.terasology.reflection.reflect.ByteCodeReflectFactory) PrintToConsoleCallback(org.terasology.benchmark.PrintToConsoleCallback) Benchmark(org.terasology.benchmark.Benchmark)

Aggregations

Benchmark (org.terasology.benchmark.Benchmark)1 PrintToConsoleCallback (org.terasology.benchmark.PrintToConsoleCallback)1 ByteCodeReflectFactory (org.terasology.reflection.reflect.ByteCodeReflectFactory)1 ReflectionReflectFactory (org.terasology.reflection.reflect.ReflectionReflectFactory)1