File tree 3 files changed +16
-6
lines changed
3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ benchmarks =
20
20
main :: IO ()
21
21
main = defaultMainWith config " hyperion-example-end-to-end" benchmarks
22
22
where
23
- config = defaultConfig
23
+ config = defaultConfigMonoid
24
24
{ configMonoidSamplingStrategy =
25
25
pure $ timeBound (fromSeconds 5 ) (repeat 10 )
26
26
}
Original file line number Diff line number Diff line change 8
8
module Hyperion.Main
9
9
( defaultMain
10
10
, Mode (.. )
11
+ , Config (.. )
11
12
, ConfigMonoid (.. )
12
13
, ReportOutput (.. )
14
+ , configFromMonoid
13
15
, nullOutputPath
14
16
, defaultConfig
17
+ , defaultConfigMonoid
15
18
, defaultMainWith
19
+ , doAnalyze
20
+ , doRun
16
21
) where
17
22
18
23
import Control.Applicative
@@ -178,8 +183,11 @@ nullOutputPath = "nul"
178
183
nullOutputPath = " /dev/null"
179
184
#endif
180
185
181
- defaultConfig :: ConfigMonoid
182
- defaultConfig = mempty
186
+ defaultConfigMonoid :: ConfigMonoid
187
+ defaultConfigMonoid = mempty
188
+
189
+ defaultConfig :: Config
190
+ defaultConfig = configFromMonoid defaultConfigMonoid
183
191
184
192
data DuplicateIdentifiers a = DuplicateIdentifiers [a ]
185
193
instance (Show a , Typeable a ) => Exception (DuplicateIdentifiers a )
@@ -315,4 +323,4 @@ defaultMain
315
323
:: String -- ^ Package name, user provided.
316
324
-> [Benchmark ] -- ^ Benchmarks to be run.
317
325
-> IO ()
318
- defaultMain = defaultMainWith defaultConfig
326
+ defaultMain = defaultMainWith defaultConfigMonoid
Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ spec = do
15
15
it " checks for duplicate identifiers" $ property $ \ b ->
16
16
length (b^.. identifiers) /= length (group (sort (b^.. identifiers))) ==>
17
17
expectFailure $ monadicIO $ run $
18
- defaultMainWith defaultConfig{configMonoidMode = return Run } " spec" [b]
18
+ defaultMainWith
19
+ defaultConfigMonoid{configMonoidMode = return Run } " spec" [b]
19
20
it " Analyzes uniquely identified benchmarks" $ property $ \ b ->
20
21
length (b^.. identifiers) == length (group (sort (b^.. identifiers))) ==>
21
22
monadicIO $ run $
22
- defaultMainWith defaultConfig{configMonoidReportOutputs = [ReportJson nullOutputPath]} " specs" [b]
23
+ defaultMainWith
24
+ defaultConfigMonoid{configMonoidReportOutputs = [ReportJson nullOutputPath]} " specs" [b]
You can’t perform that action at this time.
0 commit comments