Skip to content

Commit

Permalink
Rename benchmark classes
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed Oct 23, 2024
1 parent 37c0d71 commit d7ea1c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;

import static org.openjdk.jmh.results.format.ResultFormatType.JSON;
import static sun.misc.Unsafe.ARRAY_BYTE_BASE_OFFSET;

@SuppressWarnings("restriction")
@BenchmarkMode(Mode.AverageTime)
@Fork(1)
@Warmup(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS)
public class MemoryCopyBenchmark
public class BenchmarkMemoryCopy
{
private static final Unsafe unsafe;

Expand All @@ -69,13 +70,10 @@ public class MemoryCopyBenchmark
public static class Buffers
{
@Param({
"0",
"32",
"128",
"512",
"1024",
"1048576",
"134217728",
})
public int size;

Expand Down Expand Up @@ -188,7 +186,8 @@ public static void main(String[] args)
{
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + MemoryCopyBenchmark.class.getSimpleName() + ".*")
.include(".*" + BenchmarkMemoryCopy.class.getSimpleName() + ".*")
.resultFormat(JSON)
.build();

new Runner(options).run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
@Fork(1)
@Warmup(iterations = 4, time = 500, timeUnit = MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = MILLISECONDS)
public class SliceUtf8Benchmark
public class BenchmarkSliceUtf8
{
@Benchmark
public int benchmarkLengthOfCodePointFromStartByte(BenchmarkData data)
Expand Down Expand Up @@ -266,7 +266,7 @@ public static void main(String[] args)
{
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + SliceUtf8Benchmark.class.getSimpleName() + ".*")
.include(".*" + BenchmarkSliceUtf8.class.getSimpleName() + ".*")
.build();

new Runner(options).run();
Expand Down

0 comments on commit d7ea1c3

Please sign in to comment.