Class BenchmarkEntryPointTransformer

java.lang.Object
org.teavm.perf.BenchmarkEntryPointTransformer
All Implemented Interfaces:
org.teavm.model.ClassHolderTransformer, org.teavm.vm.spi.TeaVMPlugin

public class BenchmarkEntryPointTransformer extends Object implements org.teavm.model.ClassHolderTransformer, org.teavm.vm.spi.TeaVMPlugin
Replaces native methods of BenchmarkEntryPoint with code that creates states, sets parameters, calls setup/teardown methods and the benchmark method itself. Benchmark method is called directly from a loop in runBatch method, so there are no virtual calls or reflection between the harness and the benchmark.
  • Constructor Details

    • BenchmarkEntryPointTransformer

      public BenchmarkEntryPointTransformer(BenchmarkInfo benchmark)
  • Method Details

    • install

      public void install(org.teavm.vm.spi.TeaVMHost host)
      Specified by:
      install in interface org.teavm.vm.spi.TeaVMPlugin
    • transformClass

      public void transformClass(org.teavm.model.ClassHolder cls, org.teavm.model.ClassHolderTransformerContext context)
      Specified by:
      transformClass in interface org.teavm.model.ClassHolderTransformer