From e1f5918f40fb3d58f84c85734e3e450f019273ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Mon, 2 Oct 2023 12:28:31 +0200 Subject: [PATCH] Added timers --- .../src/com/dynamo/bob/pipeline/GameProjectBuilder.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/com.dynamo.cr/com.dynamo.cr.bob/src/com/dynamo/bob/pipeline/GameProjectBuilder.java b/com.dynamo.cr/com.dynamo.cr.bob/src/com/dynamo/bob/pipeline/GameProjectBuilder.java index d9031266f90..a643c29378c 100644 --- a/com.dynamo.cr/com.dynamo.cr.bob/src/com/dynamo/bob/pipeline/GameProjectBuilder.java +++ b/com.dynamo.cr/com.dynamo.cr.bob/src/com/dynamo/bob/pipeline/GameProjectBuilder.java @@ -422,9 +422,13 @@ public void build(Task task) throws CompileExceptionError, IOException { // create the resource graphs // the full graph contains all resources in the project // the live update graph contains each resource only once per collection proxy + logger.info("Generating the resource graph"); + long tstart = System.currentTimeMillis(); ResourceGraphs resourceGraphs = createResourceGraphs(project); ResourceGraph fullGraph = resourceGraphs.getFullGraph(); ResourceGraph liveUpdateGraph = resourceGraphs.getLiveUpdateGraph(); + long tend = System.currentTimeMillis(); + logger.info("Generating the resource graph took %f s", (tend-tstart)/1000.0); // create full list of resources including the custom resources // make sure to not archive the .arci, .arcd, .projectc, .dmanifest, .resourcepack.zip, .public.der @@ -478,8 +482,12 @@ public void build(Task task) throws CompileExceptionError, IOException { // game.graph.json fullGraph.setHexDigests(archiveBuilder.getCachedHexDigests()); + logger.info("Writing the resource graph to json"); + tstart = System.currentTimeMillis(); String fullGraphJSON = fullGraph.getRootNode().toJSON(); task.getOutputs().get(5).setContent(fullGraphJSON.getBytes()); + tend = System.currentTimeMillis(); + logger.info("Writing the resource graph to json took %f s", (tend-tstart)/1000.0); // Add copy of game.dmanifest to be published with liveupdate resources File manifestFileHandle = new File(task.getOutputs().get(3).getAbsPath());