Exemplo n.º 1
0
 @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);
 }
Exemplo n.º 2
0
 @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);
 }
Exemplo n.º 3
0
 @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);
 }
Exemplo n.º 4
0
 @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);
 }