From 9b8398668abad4d25c4be127ca399a6626a766f5 Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Fri, 3 Sep 2021 14:50:38 +0000 Subject: [PATCH] Fix array comparison benchmarks --- benchmark/bench-report/BenchReport.hs | 11 +++++++---- bin/targets.sh | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/benchmark/bench-report/BenchReport.hs b/benchmark/bench-report/BenchReport.hs index 1dcfafbea..c471f890e 100644 --- a/benchmark/bench-report/BenchReport.hs +++ b/benchmark/bench-report/BenchReport.hs @@ -185,16 +185,19 @@ showComparisons Options{..} cfg inp out = where separator = if useGauge then '/' else '.' - dropComponent = dropWhile (== separator) . dropWhile (/= separator) + dropComponent sep = dropWhile (== sep) . dropWhile (/= sep) + -- In case of tasty-bench the names could be like + -- All.Data.Array.Prim.Pinned/o-1-space.generation.show + -- All.Data.Array.Foreign/o-1-space.generation.show classifyComparison b = let b1 = if useGauge then b - else dropComponent b --- drop "All." at the beginning + else dropComponent separator b --- drop "All." at the beginning in Just - ( takeWhile (/= separator) b1 - , dropComponent b1 + ( takeWhile (/= '/') b1 + , dropComponent '/' b1 -- for tasty-bench drop up to "/" ) ------------------------------------------------------------------------------ diff --git a/bin/targets.sh b/bin/targets.sh index 6f08df128..cce6c2a49 100644 --- a/bin/targets.sh +++ b/bin/targets.sh @@ -76,8 +76,8 @@ targets () { serial_wserial_cmp="Prelude.Serial Prelude.WSerial" serial_async_cmp="Prelude.Serial Prelude.Async" concurrent_cmp="Prelude.Async Prelude.WAsync Prelude.Ahead Prelude.Parallel" - array_cmp="Memory.Array Data.Array.Prim Data.Array Data.Array.Prim.Pinned" - pinned_array_cmp="Memory.Array Data.Array.Prim.Pinned" + array_cmp="Data.Array.Foreign Data.Array.Prim Data.Array Data.Array.Prim.Pinned" + pinned_array_cmp="Data.Array.Foreign Data.Array.Prim.Pinned" base_parser_cmp=$base_parser_grp COMPARISONS="\