mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-26 11:07:53 +01:00
get back jmh/jcstress
This commit is contained in:
parent
79716ab749
commit
a68d13a995
@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id("io.github.reyerizo.gradle.jcstress") version "0.8.13"
|
||||
id("minestom.common-conventions")
|
||||
id("io.github.reyerizo.gradle.jcstress") version "0.8.15"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -1,10 +1,9 @@
|
||||
plugins {
|
||||
id("me.champeau.jmh") version ("0.6.6")
|
||||
id("minestom.common-conventions")
|
||||
id("me.champeau.jmh") version ("0.7.2")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
jmhImplementation(rootProject)
|
||||
jmh(libs.jmh.core)
|
||||
jmhAnnotationProcessor(libs.jmh.annotationprocessor)
|
||||
}
|
||||
}
|
||||
|
@ -4,15 +4,10 @@ import net.minestom.server.command.builder.Command;
|
||||
import org.openjdk.jmh.annotations.*;
|
||||
import org.openjdk.jmh.infra.Blackhole;
|
||||
|
||||
import java.lang.String;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static net.minestom.server.command.builder.arguments.ArgumentType.Double;
|
||||
import static net.minestom.server.command.builder.arguments.ArgumentType.Float;
|
||||
import static net.minestom.server.command.builder.arguments.ArgumentType.Integer;
|
||||
import static net.minestom.server.command.builder.arguments.ArgumentType.Long;
|
||||
import static net.minestom.server.command.builder.arguments.ArgumentType.*;
|
||||
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@ -28,8 +23,8 @@ public class CommandBenchmark {
|
||||
public void setup() {
|
||||
var graph = Graph.merge(Set.of(
|
||||
new Command("tp", "teleport") {{
|
||||
addSyntax((sender, context) -> {}, Potion("pos"));
|
||||
addSyntax((sender, context) -> {}, Entity("entity"), Potion("pos"));
|
||||
addSyntax((sender, context) -> {}, RelativeVec3("pos"));
|
||||
addSyntax((sender, context) -> {}, Entity("entity"), RelativeVec3("pos"));
|
||||
}},
|
||||
new Command("setblock", "set") {{
|
||||
addSyntax((sender, context) -> {}, RelativeBlockPosition("pos"), BlockState("block"));
|
||||
@ -56,7 +51,7 @@ public class CommandBenchmark {
|
||||
}}
|
||||
));
|
||||
final CommandParser commandParser = CommandParser.parser();
|
||||
this.parser = input -> commandParser.parse(graph, input);
|
||||
this.parser = input -> commandParser.parse(null, graph, input);
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
|
@ -2,7 +2,7 @@ rootProject.name = "minestom"
|
||||
|
||||
include("testing")
|
||||
include("code-generators")
|
||||
//include("jmh-benchmarks")
|
||||
//include("jcstress-tests")
|
||||
include("jmh-benchmarks")
|
||||
include("jcstress-tests")
|
||||
|
||||
include("demo")
|
||||
|
Loading…
Reference in New Issue
Block a user