@Test public void staticFieldTest() { benchmarkParameters.setReflectionBase(ReflectionParameters.ReflectionBase.ChangeField); benchmarkParameters.setUseReflection(false); benchmarkFactory.start(); String result = benchmarkFactory.printFormattedResult(); WriteResultUtil.writeResult( URL + "/field/staticField", this.getClass().getSimpleName(), result); }
@Test public void methodCallTest() { benchmarkParameters.setReflectionBase(ReflectionParameters.ReflectionBase.InvokeMethod); benchmarkParameters.setUseReflection(false); benchmarkFactory.start(); String result = benchmarkFactory.printFormattedResult(); WriteResultUtil.writeResult( URL + "/methodCall/staticCall", this.getClass().getSimpleName(), result); }
@Test public void staticConstructorTest() { benchmarkParameters.setReflectionBase(ReflectionParameters.ReflectionBase.GetConstructor); benchmarkParameters.setUseReflection(false); benchmarkFactory.start(); String result = benchmarkFactory.printFormattedResult(); WriteResultUtil.writeResult( URL + "/constructor/staticConstructor", this.getClass().getSimpleName(), result); }
@Test public void allocateArrayReflectionTest() { benchmarkParameters.setReflectionBase(ReflectionParameters.ReflectionBase.AllocateArray); benchmarkParameters.setUseReflection(true); benchmarkFactory.start(); String result = benchmarkFactory.printFormattedResult(); WriteResultUtil.writeResult( URL + "/array/allocateArrayReflection", this.getClass().getSimpleName(), result); }