diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2018-12-16 01:02:08 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-01-22 03:06:51 +0100 |
commit | 571448ca604065a6e6bfe7e6423b8ae6789b4dd9 (patch) | |
tree | df59ef3ea82b55e1069e0d7c13dd748a7bdc8be3 /src | |
parent | 842de542f71616b6d828ea2f993f227e59f1ebc5 (diff) |
Add helper compilation time to debug output
Diffstat (limited to 'src')
-rw-r--r-- | src/CabalHelper/Compiletime/Compile.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/CabalHelper/Compiletime/Compile.hs b/src/CabalHelper/Compiletime/Compile.hs index 78c052e..97adac2 100644 --- a/src/CabalHelper/Compiletime/Compile.hs +++ b/src/CabalHelper/Compiletime/Compile.hs @@ -39,6 +39,7 @@ import Data.Maybe import Data.String import Data.Version import Text.Printf +import qualified System.Clock as Clock import System.Directory import System.FilePath import System.Exit @@ -114,6 +115,7 @@ compileHelper' => CompHelperEnv' UnpackedCabalVersion -> IO (Either ExitCode FilePath) compileHelper' CompHelperEnv {..} = do + t0 <- Clock.getTime Clock.Monotonic ghcVer <- ghcVersion Just (prepare, comp) <- case cheCabalVer of cabalVer@CabalHEAD {} -> do @@ -143,6 +145,10 @@ compileHelper' CompHelperEnv {..} = do vLog $ "helper exe does not exist, compiling "++compExePath prepare >> compile cp comp + t1 <- Clock.getTime Clock.Monotonic + let dt = (/10e9) $ fromInteger $ Clock.toNanoSecs $ Clock.diffTimeSpec t0 t1 + dt :: Float + vLog $ printf "compileHelper took %.5fs" dt return rv |