Skip to content
  • MaxGabriel's avatar
    Document the units of -ddump-timings · 89f034dd
    MaxGabriel authored and Marge Bot's avatar Marge Bot committed
    Right now, in the output of -ddump-timings to a file, you can't tell what the units are:
    
    ```
    CodeGen [TemplateTestImports]: alloc=22454880 time=14.597
    ```
    
    I believe bytes/milliseconds are the correct units, but confirmation would be appreciated. I'm basing it off of this snippet from `withTiming'`:
    
    ```
    when (verbosity dflags >= 2 && prtimings == PrintTimings)
      $ liftIO $ logInfo dflags (defaultUserStyle dflags)
          (text "!!!" <+> what <> colon <+> text "finished in"
           <+> doublePrec 2 time
           <+> text "milliseconds"
           <> comma
           <+> text "allocated"
           <+> doublePrec 3 (realToFrac alloc / 1024 / 1024)
           <+> text "megabytes")
    ```
    
    which implies time is in milliseconds, and allocations in bytes (which divided by 1024 would be KB, and again would be MB)
    89f034dd