Add TaskProfiler back

This commit is contained in:
Balthild authored and Jason Mitchell committed 2020-05-25 13:54:38 -07:00
1 parent 6e23c51868
commit 458947628c
2 files changed
+9

No files matched your search

@@ -23,11 +23,15 @@ public class GuiCraftingRecipe extends GuiRecipe
GuiContainer prevscreen = mc.currentScreen instanceof GuiContainer ? (GuiContainer) mc.currentScreen : null;
ArrayList<ICraftingHandler> handlers;
TaskProfiler profiler = ProfilerRecipeHandler.getProfiler();
try {
profiler.start("recipe.concurrent.crafting");
handlers = forkJoinPool.submit(() -> getCraftingHandlers(outputId, results)).get();
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
return false;
} finally {
profiler.end();
}
if (handlers.isEmpty())
@@ -1,5 +1,6 @@
package codechicken.nei.recipe;
import codechicken.core.TaskProfiler;
import codechicken.nei.NEIClientUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
@@ -22,11 +23,15 @@ public class GuiUsageRecipe extends GuiRecipe
GuiContainer prevscreen = mc.currentScreen instanceof GuiContainer ? (GuiContainer) mc.currentScreen : null;
ArrayList<IUsageHandler> handlers;
TaskProfiler profiler = ProfilerRecipeHandler.getProfiler();
try {
profiler.start("recipe.concurrent.usage");
handlers = forkJoinPool.submit(() -> getUsageHandlers(inputId, ingredients)).get();
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
return false;
} finally {
profiler.end();
}
if (handlers.isEmpty())