From 03c400a3564d01a4f8958de606aeb878d17e1804 Mon Sep 17 00:00:00 2001 From: Karol Stasiak Date: Mon, 26 Feb 2018 01:06:09 +0100 Subject: [PATCH] More diagnostic messages after compilation --- src/main/scala/millfork/Main.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/scala/millfork/Main.scala b/src/main/scala/millfork/Main.scala index b0f981f9..b4683a7f 100644 --- a/src/main/scala/millfork/Main.scala +++ b/src/main/scala/millfork/Main.scala @@ -46,6 +46,7 @@ object Main { if (args.isEmpty) { ErrorReporting.info("For help, use --help") } + val startTime = System.nanoTime() val (status, c) = parser.parse(Context(Nil), args.toList) status match { case CliStatus.Quit => return @@ -124,7 +125,9 @@ object Main { } val path = Paths.get(prgOutput) ErrorReporting.debug("Writing output to " + path.toAbsolutePath) + ErrorReporting.debug(s"Total output size: ${result.code.length} bytes") Files.write(path, result.code) + ErrorReporting.debug(s"Total time: ${Math.round((System.nanoTime() - startTime)/1e6)} ms") c.runFileName.foreach(program => new ProcessBuilder(program, path.toAbsolutePath.toString).start() )