From fde7a6a7c8f08984095827cdbe0e3e4df5f1fab8 Mon Sep 17 00:00:00 2001 From: Colin Schmidt Date: Tue, 6 Jun 2017 14:36:09 -0700 Subject: Display the total time firrtl took to compile (#599) * Display the total time firrtl took to compile * Switch timing print out to error(aka default)--- src/main/scala/firrtl/Compiler.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/scala/firrtl/Compiler.scala b/src/main/scala/firrtl/Compiler.scala index a56fb793..5ef291da 100644 --- a/src/main/scala/firrtl/Compiler.scala +++ b/src/main/scala/firrtl/Compiler.scala @@ -416,7 +416,12 @@ trait Compiler extends LazyLogging { def compile(state: CircuitState, customTransforms: Seq[Transform]): CircuitState = { val allTransforms = CompilerUtils.mergeTransforms(transforms, customTransforms) :+ emitter - val finalState = allTransforms.foldLeft(state) { (in, xform) => xform.runTransform(in) } + val (timeMillis, finalState) = Utils.time { + allTransforms.foldLeft(state) { (in, xform) => xform.runTransform(in) } + } + + logger.error(f"Total FIRRTL Compile Time: $timeMillis%.1f ms") + finalState } -- cgit v1.2.3