complexity 0.1 → 0.1.1
raw patch · 2 files changed
+28/−28 lines, 2 files
Files
- Test/Complexity/Chart.hs +27/−27
- complexity.cabal +1/−1
Test/Complexity/Chart.hs view
@@ -20,13 +20,12 @@ ) -convertColour :: Double -> Colour Double -> Color-convertColour alpha c = let rgb = toSRGB c- in Color { c_r = channelRed rgb- , c_g = channelGreen rgb- , c_b = channelBlue rgb- , c_a = alpha- }+colourToCairo :: Colour Double -> Color+colourToCairo c = let rgb = toSRGB c+ in Color { c_r = channelRed rgb+ , c_g = channelGreen rgb+ , c_b = channelBlue rgb+ } statsToChart :: [(MeasurementStats, Colour Double)] -> Layout1 Double Double statsToChart [] = defaultLayout1@@ -50,39 +49,40 @@ ] statsToPlots :: Colour Double -> MeasurementStats -> [Plot Double Double]-statsToPlots c stats = [ plot_legend ^= [] $ toPlot cpuMinMax- , plot_legend ^= [] $ toPlot cpuMin- , plot_legend ^= [] $ toPlot cpuMax- , toPlot cpuMean+statsToPlots c stats = --[ plot_legend ^= [] $ toPlot cpuMinMax+ --, plot_legend ^= [] $ toPlot cpuMin+ --, plot_legend ^= [] $ toPlot cpuMax+ --] +++ [ toPlot cpuMean , plot_legend ^= [] $ toPlot cpuErr , plot_legend ^= [] $ toPlot cpuMeanPts ]- where colour_normal = convertColour 1.00c- colour_dark = convertColour 1.00 $ blend 0.5 c CN.black- colour_light = convertColour 0.70 c- colour_lighter = convertColour 0.15 c- colour_lightest = convertColour 0.07 c+ where colour_normal = colourToCairo c+ colour_dark = colourToCairo $ blend 0.5 c CN.black+ colour_light = colourToCairo $ blend 0.7 c CN.white+-- colour_lighter = colourToCairo $ blend 0.5 c CN.white+-- colour_lightest = colourToCairo $ blend 0.3 c CN.white cpuMean = plot_lines_values ^= [zip xs ys_cpuMean2] $ plot_lines_style .> line_color ^= colour_normal $ plot_lines_title ^= msDesc stats $ defaultPlotLines - cpuMin = plot_lines_values ^= [zip xs ys_cpuMin]- $ plot_lines_style .> line_color ^= colour_lighter- $ defaultPlotLines+-- cpuMin = plot_lines_values ^= [zip xs ys_cpuMin]+-- $ plot_lines_style .> line_color ^= colour_lighter+-- $ defaultPlotLines - cpuMax = plot_lines_values ^= [zip xs ys_cpuMax]- $ plot_lines_style .> line_color ^= colour_lighter- $ defaultPlotLines+-- cpuMax = plot_lines_values ^= [zip xs ys_cpuMax]+-- $ plot_lines_style .> line_color ^= colour_lighter+-- $ defaultPlotLines cpuMeanPts = plot_points_values ^= zip xs ys_cpuMean2 $ plot_points_style ^= filledCircles 2 colour_dark $ defaultPlotPoints - cpuMinMax = plot_fillbetween_values ^= zip xs (zip ys_cpuMin ys_cpuMax)- $ plot_fillbetween_style ^= solidFillStyle colour_lightest- $ defaultPlotFillBetween+-- cpuMinMax = plot_fillbetween_values ^= zip xs (zip ys_cpuMin ys_cpuMax)+-- $ plot_fillbetween_style ^= solidFillStyle colour_lightest+-- $ defaultPlotFillBetween cpuErr = plot_errbars_values ^= [symErrPoint x y 0 e | (x, y, e) <- zip3 xs ys_cpuMean vs_cpuStdDev] $ plot_errbars_line_style .> line_color ^= colour_light@@ -92,8 +92,8 @@ xs = map (fromIntegral . fst) ps ys_cpuMean = map (statsMean . snd) ps ys_cpuMean2 = map (statsMean2 . snd) ps- ys_cpuMin = map (statsMin . snd) ps- ys_cpuMax = map (statsMax . snd) ps+-- ys_cpuMin = map (statsMin . snd) ps+-- ys_cpuMax = map (statsMax . snd) ps vs_cpuStdDev = map (statsStdDev . snd) ps showStatsChart :: [MeasurementStats] -> IO ()
complexity.cabal view
@@ -1,5 +1,5 @@ name: complexity-version: 0.1+version: 0.1.1 cabal-version: >= 1.6 build-type: Simple stability: experimental