Mercurial > hg > gc-bench
view src/main/java/org/openjdk/gcbench/alloc/special/Finalizables.java @ 79:e08d29090857
alloc.special.* cases
author | shade |
---|---|
date | Thu, 26 Oct 2017 12:02:48 +0200 |
parents | src/main/java/org/openjdk/gcbench/alloc/plain/Objects.java@f8496889e1ac |
children | 583fef4276f5 |
line wrap: on
line source
package org.openjdk.gcbench.alloc.special; import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.infra.Blackhole; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) @State(Scope.Benchmark) public class Finalizables { @Benchmark public void test(Blackhole bh) { bh.consume(new Finalizable()); bh.consume(new byte[10000]); } public static class Finalizable { @Override protected void finalize() throws Throwable { super.finalize(); } } }