gipeda 0.1.0.1 → 0.1.0.2
raw patch · 5 files changed
+43/−16 lines, 5 filesdep ~filepathdep ~shake
Dependency ranges changed: filepath, shake
Files
- README.md +2/−2
- gipeda.cabal +4/−4
- site/js/gipeda.js +19/−6
- src/BenchmarkSettings.hs +10/−3
- src/GraphReport.hs +8/−1
README.md view
@@ -26,7 +26,7 @@ * [GHC’s gipeda installation]. [Demo page]: http://nomeata.github.io/gipeda/-[GHC’s gipeda installation]: https://perf.ghc.haskell.org/+[GHC’s gipeda installation]: https://perf.haskell.org/ Setting it up -------------@@ -35,7 +35,7 @@ * Install a Haskell compiler, including the `cablal` tool. * Install the dependencies: - cabal install --dependencies-only+ cabal install --only-dependencies * Compile it:
gipeda.cabal view
@@ -1,5 +1,5 @@ name: gipeda-version: 0.1.0.1+version: 0.1.0.2 category: Development synopsis: Git Performance Dashboard description:@@ -23,7 +23,7 @@ <http://nomeata.github.io/gipeda/> . * GHC’s gipeda installation:- <https://perf.ghc.haskell.org/>+ <https://perf.haskell.org/> homepage: https://github.com/nomeata/gipeda license: MIT license-file: LICENSE@@ -63,8 +63,8 @@ bytestring >= 0.10 && <0.11, containers >= 0.4 && <0.6, directory >= 1.2 && <1.3,- filepath >= 1.3 && <1.4,- shake >= 0.13 && <0.15,+ filepath >= 1.3 && <1.5,+ shake >= 0.13 && <0.16, text >= 0.11 && <1.3, unordered-containers >= 0.2 && <0.3, split >= 0.2 && <0.3,
site/js/gipeda.js view
@@ -208,7 +208,8 @@ dataChanged.dispatch(); if (callback) callback(); },- dataType: 'json'+ cache: false,+ dataType: 'json', }); } }@@ -288,8 +289,7 @@ width: '300px', }).appendTo("#main"); - var plot = $.plot("#benchChart",- [{+ var plot_series = { lines: { show: true, fill: true, fillColor: "rgba(255, 255, 255, 0.8)" }, points: { show: true, fill: false }, label: benchName,@@ -298,8 +298,9 @@ if (!x.benchResults[benchName]) return; return [commits.length - i, x.benchResults[benchName].value] }),- }],- { + };++ var plot_options = { legend: { position: 'nw', },@@ -307,6 +308,7 @@ hoverable: true, clickable: true, },+ yaxis: {}, xaxis: { // ticks: values.map(function (x,i){return [i,x[0]]}), tickFormatter: function (i,axis) {@@ -320,7 +322,18 @@ } } }- });+ };++ var numberType;+ if (data.benchmarkSettings && data.benchmarkSettings[benchName]) {+ numberType = data.benchmarkSettings[benchName].numberType;+ }+ if (numberType == "integral" || numberType == "small integral") {+ plot_options.yaxis.minTickSize = 1;+ plot_options.yaxis.tickDecimals = 0;+ }++ var plot = $.plot("#benchChart", [plot_series], plot_options); viewData.highlights.forEach(function (hash) { commits.forEach(function (rev,i) {
src/BenchmarkSettings.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module BenchmarkSettings where import Data.Yaml@@ -9,11 +9,17 @@ import Control.Monad import Data.Monoid import Data.Maybe+import GHC.Generics (Generic) data NumberType = IntegralNT | SmallIntegralNT | FloatingNT- deriving Show+ deriving (Show) +instance ToJSON NumberType where+ toJSON IntegralNT = String "integral"+ toJSON SmallIntegralNT = String "small integral"+ toJSON FloatingNT = String "floating"+ type BenchName = String data BenchSettings = BenchSettings { smallerIsBetter :: Bool@@ -22,7 +28,8 @@ , group :: String , threshold :: Double }- deriving Show+ deriving (Show, Generic)+instance ToJSON BenchSettings defaultBenchSettings :: BenchSettings defaultBenchSettings = BenchSettings True "" IntegralNT "" 3
src/GraphReport.hs view
@@ -11,9 +11,12 @@ import Paths import ReadResult import ReportTypes+import qualified BenchmarkSettings as S graphReportMain :: [String] -> IO () graphReportMain (bench:revs) = do+ settings <- S.readSettings "settings.yaml"+ g <- forM revs $ \rev -> do m <- readCSV rev let v = M.lookup bench m@@ -23,7 +26,11 @@ [ "value" .= v ] ] ]- let doc = object ["revisions" .= object g]+ let doc = object+ [ "revisions" .= object g+ , "benchmarkSettings" .= object+ [ T.pack bench .= toJSON (S.benchSettings settings bench) ]+ ] BS.putStr (encode doc)