packages feed

profiteur 0.4.5.1 → 0.4.6.0

raw patch · 7 files changed

+37/−13 lines, 7 filesdep ~aesondep ~file-embeddep ~template-haskell

Dependency ranges changed: aeson, file-embed, template-haskell

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # CHANGELOG +- 0.4.6.0 (2020-05-28)+    * Add source code locations to cost-centre details (by Rodney Lorrimar)+    * Bump `aeson` dependency to 1.5+    * Bump `file-embed` to 0.0.11+ - 0.4.5.1 (2019-03-15)     * Bump `aeson` dependency to 1.4     * Bump `containers` dependency to 0.6
README.md view
@@ -15,6 +15,8 @@     ./your-program +RTS -p -RTS     profiteur your-program.prof +Open the output, `your-program.prof.html`, in a web browser.+ See also [example/Makefile](example/Makefile).  A tree browser and a tree map are available to browse the profile.
data/js/details.js view
@@ -57,6 +57,10 @@             .append(mk('td').text('Alloc'))             .append(mk('td').addClass('alloc'))); +    table.append(mk('tr')+            .append(mk('td').text('Src'))+            .append(mk('td').append(mk('code').addClass('src'))));+     table.append(mk('tr').addClass('mainTimeRow')             .append(mk('td').text('MAIN Time'))             .append(mk('td').addClass('mainTime')));@@ -125,6 +129,7 @@     this.container.find('.entries').text(node.getEntries());     this.container.find('.time').text(formatNum(time));     this.container.find('.alloc').text(formatNum(alloc));+    this.container.find('.src').text(node.getSourceLoc().replace(/(^<|>$)/g, ""));     this.container.find('.mainTime').text(formatNum(mainTime));     this.container.find('.mainAlloc').text(formatNum(mainAlloc)); 
data/js/node.js view
@@ -17,10 +17,11 @@     var data = prof[id];     _this.name     = data[0];     _this.module   = data[1];-    _this.entries  = data[2];-    _this.time     = data[3];-    _this.alloc    = data[4];-    _this.childIds = data[5];+    _this.src      = data[2];+    _this.entries  = data[3];+    _this.time     = data[4];+    _this.alloc    = data[5];+    _this.childIds = data[6];     _this.children = [];      if (sorting) sorting.addChangeListener(_this);@@ -72,6 +73,10 @@  Node.prototype.getFullName = function() {     return this.module + '.' + this.name;+};++Node.prototype.getSourceLoc = function() {+    return this.src; };  Node.prototype.getEntries = function() {
profiteur.cabal view
@@ -1,5 +1,5 @@ Name:                profiteur-Version:             0.4.5.1+Version:             0.4.6.0 Synopsis:            Treemap visualiser for GHC prof files Description:         Treemap visualiser for GHC prof files Homepage:            http://github.com/jaspervdj/profiteur@@ -10,7 +10,7 @@ Copyright:           2014 Jasper Van der Jeugt Category:            Development, Profiling Build-type:          Simple-Cabal-version:       >= 1.8+Cabal-version:       >= 1.10  Extra-source-files:   CHANGELOG.md@@ -41,9 +41,10 @@   Location: git://github.com/jaspervdj/profiteur.git  Executable profiteur-  Main-is:        Main.hs-  Hs-source-dirs: src-  Ghc-options:    -Wall+  Default-language: Haskell2010+  Ghc-options:      -Wall+  Hs-source-dirs:   src+  Main-is:          Main.hs    Other-modules:     Profiteur.Core@@ -53,7 +54,7 @@     Paths_profiteur    Build-depends:-    aeson                >= 0.6  && < 1.5,+    aeson                >= 0.6  && < 1.6,     base                 >= 4.8  && < 5,     bytestring           >= 0.9  && < 0.11,     containers           >= 0.5  && < 0.7,@@ -68,7 +69,7 @@   if flag(embed-data-files)     Hs-source-dirs: src/embed     Build-depends:-      file-embed       >= 0.0.10 && < 0.0.11,-      template-haskell >= 2.11   && < 2.12+      file-embed       >= 0.0.10 && < 0.0.12,+      template-haskell   else     Hs-source-dirs: src/noembed
src/Profiteur/Core.hs view
@@ -32,6 +32,7 @@ data CostCentre = CostCentre     { ccName            :: !T.Text     , ccModule          :: !T.Text+    , ccSrc             :: !T.Text     , ccId              :: !Id     , ccEntries         :: !Int     , ccIndividualTime  :: !Double@@ -47,6 +48,7 @@     { nId       :: !Id     , nName     :: !T.Text     , nModule   :: !T.Text+    , nSrc      :: !T.Text     , nEntries  :: !Int     , nTime     :: !Double     , nAlloc    :: !Double@@ -72,6 +74,7 @@                 { nId       = ccId cc                 , nName     = ccName cc                 , nModule   = ccModule cc+                , nSrc      = ccSrc cc                 , nEntries  = ccEntries cc                 , nTime     = ccInheritedTime cc                 , nAlloc    = ccInheritedAlloc cc@@ -87,6 +90,7 @@             { nId       = ccId cc <> ".indiv"             , nName     = ccName cc <> " (indiv)"             , nModule   = ccModule cc+            , nSrc      = ccSrc cc             , nEntries  = ccEntries cc             , nTime     = ccIndividualTime cc             , nAlloc    = ccIndividualAlloc cc@@ -99,6 +103,7 @@     toJSON Node {..} = A.toJSON         [ A.toJSON nName         , A.toJSON nModule+        , A.toJSON nSrc         , A.toJSON nEntries         , A.toJSON nTime         , A.toJSON nAlloc
src/Profiteur/Parser.hs view
@@ -15,11 +15,11 @@ import qualified GHC.Prof        as Prof import qualified GHC.Prof.Types  as Prof +import           Data.Maybe (fromMaybe)  -------------------------------------------------------------------------------- import           Profiteur.Core - -------------------------------------------------------------------------------- decode :: TL.Text -> Either String CostCentre decode txt = Prof.decode txt >>= profileToCostCentre@@ -59,6 +59,7 @@         return CostCentre             { ccName            = Prof.costCentreName cc             , ccModule          = Prof.costCentreModule cc+            , ccSrc             = fromMaybe mempty $ Prof.costCentreSrc cc             , ccId              = T.pack (show $ no)             , ccEntries         = fromIntegral (Prof.costCentreEntries cc)             , ccIndividualTime  = Scientific.toRealFloat (Prof.costCentreIndTime cc)