updated spark (#484)

This commit is contained in:
pietro-lopes 2024-11-28 10:46:29 -03:00 committed by GitHub
parent a29bdb2f82
commit 520de2c12b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 5 deletions

View File

@ -13,8 +13,7 @@ import me.lucko.spark.common.sampler.ThreadGrouper;
import me.lucko.spark.common.sampler.async.AsyncSampler; import me.lucko.spark.common.sampler.async.AsyncSampler;
import me.lucko.spark.common.sampler.async.SampleCollector; import me.lucko.spark.common.sampler.async.SampleCollector;
import me.lucko.spark.common.sampler.java.JavaSampler; import me.lucko.spark.common.sampler.java.JavaSampler;
import me.lucko.spark.common.sampler.node.MergeMode; import me.lucko.spark.common.sampler.java.MergeStrategy;
import me.lucko.spark.common.util.MethodDisambiguator;
import me.lucko.spark.lib.adventure.text.Component; import me.lucko.spark.lib.adventure.text.Component;
import me.lucko.spark.proto.SparkSamplerProtos; import me.lucko.spark.proto.SparkSamplerProtos;
import net.minecraft.SharedConstants; import net.minecraft.SharedConstants;
@ -42,7 +41,7 @@ public class SparkLaunchProfiler {
public static void start(String key) { public static void start(String key) {
if (!ongoingSamplers.containsKey(key)) { if (!ongoingSamplers.containsKey(key)) {
Sampler sampler; Sampler sampler;
SamplerSettings settings = new SamplerSettings(4000, ThreadDumper.ALL, ThreadGrouper.BY_NAME, -1, false); SamplerSettings settings = new SamplerSettings(4000, ThreadDumper.ALL, ThreadGrouper.BY_NAME.get(), -1, false);
try { try {
if(USE_JAVA_SAMPLER_FOR_LAUNCH) { if(USE_JAVA_SAMPLER_FOR_LAUNCH) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
@ -71,7 +70,7 @@ public class SparkLaunchProfiler {
SparkSamplerProtos.SamplerData output = sampler.toProto(platform, new Sampler.ExportProps() SparkSamplerProtos.SamplerData output = sampler.toProto(platform, new Sampler.ExportProps()
.creator(new CommandSender.Data(commandSender.getName(), commandSender.getUniqueId())) .creator(new CommandSender.Data(commandSender.getName(), commandSender.getUniqueId()))
.comment("Stage: " + key) .comment("Stage: " + key)
.mergeMode(() -> MergeMode.sameMethod(new MethodDisambiguator())) .mergeStrategy(MergeStrategy.SAME_METHOD)
.classSourceLookup(platform::createClassSourceLookup)); .classSourceLookup(platform::createClassSourceLookup));
try { try {
String urlKey = platform.getBytebinClient().postContent(output, "application/x-spark-sampler").key(); String urlKey = platform.getBytebinClient().postContent(output, "application/x-spark-sampler").key();
@ -95,6 +94,11 @@ public class SparkLaunchProfiler {
return ModernFixPlatformHooks.INSTANCE.getPlatformName(); return ModernFixPlatformHooks.INSTANCE.getPlatformName();
} }
@Override
public String getBrand() {
return this.getName();
}
@Override @Override
public String getVersion() { public String getVersion() {
return ModernFixPlatformHooks.INSTANCE.getVersionString(); return ModernFixPlatformHooks.INSTANCE.getVersionString();

View File

@ -26,7 +26,7 @@ continuity_version=3.0.0-beta.4+1.20.2
modmenu_version=7.0.0-beta.2 modmenu_version=7.0.0-beta.2
diagonal_fences_version=4558828 diagonal_fences_version=4558828
spark_version=4587310 spark_version=5759671
use_fabric_api_at_runtime=false use_fabric_api_at_runtime=false