gauge 0.2.2 → 0.2.3
raw patch · 3 files changed
+12/−3 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Gauge.Main.Options: Exact :: MatchType
- Gauge.Benchmark: Benchmarkable :: (Int64 -> IO a) -> (Int64 -> a -> IO ()) -> (a -> Int64 -> IO ()) -> Bool -> Benchmarkable
+ Gauge.Benchmark: Benchmarkable :: Int64 -> IO a -> Int64 -> a -> IO () -> a -> Int64 -> IO () -> Bool -> Benchmarkable
Files
- Gauge/Main/Options.hs +6/−2
- changelog.md +5/−0
- gauge.cabal +1/−1
Gauge/Main/Options.hs view
@@ -49,7 +49,9 @@ Generic) -- | How to match a benchmark name.-data MatchType = Prefix+data MatchType = Exact+ -- ^ Match the exact benchmark name+ | Prefix -- ^ Match by prefix. For example, a prefix of -- @\"foo\"@ will match @\"foobar\"@. | Pattern@@ -179,6 +181,7 @@ -> (String -> Bool) makeSelector matchKind args = case matchKind of+ Exact -> \b -> null args || any (== b) args Prefix -> \b -> null args || any (`isPrefixOf` b) args Pattern -> \b -> null args || any (`isInfixOf` b) args IPattern -> \b -> null args || any (`isInfixOf` map toLower b) (map (map toLower) args)@@ -224,7 +227,7 @@ , Option "t" ["template"] (fileArg setTemplate) "Template to use for report" , Option "n" ["iters"] (ReqArg setIters "ITERS") "Run benchmarks, don't analyse" , Option "m" ["match"] (ReqArg setMatch "MATCH") $- "Benchmark match style: prefix, pattern (substring), "+ "Benchmark match style: prefix (default), exact, pattern (substring), " ++ "or ipattern (case insensitive)" , Option "l" ["list"] (NoArg $ setMode List) "List benchmarks" , Option "" ["version"] (NoArg $ setMode Version) "Show version info"@@ -257,6 +260,7 @@ let m = case map toLower s of "pfx" -> Prefix "prefix" -> Prefix+ "exact" -> Exact "pattern" -> Pattern "ipattern" -> IPattern _ -> optionError ("unknown match type: " <> s)
changelog.md view
@@ -1,3 +1,8 @@+# 0.2.3++* Add a new benchmark matching option "-m exact" to match the benchmark name+ exactly.+ # 0.2.2 * Write data to CSV file in quick mode too.
gauge.cabal view
@@ -1,5 +1,5 @@ name: gauge-version: 0.2.2+version: 0.2.3 synopsis: small framework for performance measurement and analysis license: BSD3 license-file: LICENSE