diff options
author | sheaf <sam.derbyshire@gmail.com> | 2021-08-15 01:29:03 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-15 09:01:06 -0400 |
commit | 71130bf881fefccb4945b7c167d465ba94dda3ec (patch) | |
tree | b279f09b264812596929f1b4139808d04827a33f | |
parent | 1e896b476086e83ed6e97fb9d0ba8b96fed07783 (diff) | |
download | haskell-71130bf881fefccb4945b7c167d465ba94dda3ec.tar.gz |
Update TcPlugin_RewritePerf performance test
This test exhibited inconsistent behaviour, with different CI runs
having a 98% decrease in allocations.
This commit addresses this problem by ensuring that we measure
allocations of the whole collection of modules used in the test.
-------------------------
Metric Increase:
TcPlugin_RewritePerf
-------------------------
-rw-r--r-- | testsuite/tests/tcplugins/TcPlugin_Nullary.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/tcplugins/TcPlugin_Rewrite.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/tcplugins/TcPlugin_RewritePerf.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/tcplugins/TcPlugin_TyFam.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/tcplugins/all.T | 39 |
5 files changed, 21 insertions, 29 deletions
diff --git a/testsuite/tests/tcplugins/TcPlugin_Nullary.stderr b/testsuite/tests/tcplugins/TcPlugin_Nullary.stderr index b09af8d727..96616651dd 100644 --- a/testsuite/tests/tcplugins/TcPlugin_Nullary.stderr +++ b/testsuite/tests/tcplugins/TcPlugin_Nullary.stderr @@ -1 +1,4 @@ +[1 of 4] Compiling Common ( Common.hs, Common.o ) +[2 of 4] Compiling Definitions ( Definitions.hs, Definitions.o ) +[3 of 4] Compiling NullaryPlugin ( NullaryPlugin.hs, NullaryPlugin.o ) [4 of 4] Compiling TcPlugin_Nullary ( TcPlugin_Nullary.hs, TcPlugin_Nullary.o ) diff --git a/testsuite/tests/tcplugins/TcPlugin_Rewrite.stderr b/testsuite/tests/tcplugins/TcPlugin_Rewrite.stderr index 5fd74e759e..cf43052428 100644 --- a/testsuite/tests/tcplugins/TcPlugin_Rewrite.stderr +++ b/testsuite/tests/tcplugins/TcPlugin_Rewrite.stderr @@ -1 +1,4 @@ +[1 of 4] Compiling Common ( Common.hs, Common.o ) +[2 of 4] Compiling Definitions ( Definitions.hs, Definitions.o ) +[3 of 4] Compiling RewritePlugin ( RewritePlugin.hs, RewritePlugin.o ) [4 of 4] Compiling TcPlugin_Rewrite ( TcPlugin_Rewrite.hs, TcPlugin_Rewrite.o ) diff --git a/testsuite/tests/tcplugins/TcPlugin_RewritePerf.stderr b/testsuite/tests/tcplugins/TcPlugin_RewritePerf.stderr index 3d4801cc51..1600c377f6 100644 --- a/testsuite/tests/tcplugins/TcPlugin_RewritePerf.stderr +++ b/testsuite/tests/tcplugins/TcPlugin_RewritePerf.stderr @@ -1,3 +1,5 @@ +[1 of 3] Compiling RewritePerfDefs ( RewritePerfDefs.hs, RewritePerfDefs.o ) +[2 of 3] Compiling RewritePerfPlugin ( RewritePerfPlugin.hs, RewritePerfPlugin.o ) [3 of 3] Compiling Main ( TcPlugin_RewritePerf.hs, TcPlugin_RewritePerf.o ) TcPlugin_RewritePerf.hs:25:8: error: diff --git a/testsuite/tests/tcplugins/TcPlugin_TyFam.stderr b/testsuite/tests/tcplugins/TcPlugin_TyFam.stderr index 3b87222521..2d88aad3ea 100644 --- a/testsuite/tests/tcplugins/TcPlugin_TyFam.stderr +++ b/testsuite/tests/tcplugins/TcPlugin_TyFam.stderr @@ -1 +1,4 @@ +[1 of 4] Compiling Common ( Common.hs, Common.o ) +[2 of 4] Compiling Definitions ( Definitions.hs, Definitions.o ) +[3 of 4] Compiling TyFamPlugin ( TyFamPlugin.hs, TyFamPlugin.o ) [4 of 4] Compiling TcPlugin_TyFam ( TcPlugin_TyFam.hs, TcPlugin_TyFam.o ) diff --git a/testsuite/tests/tcplugins/all.T b/testsuite/tests/tcplugins/all.T index 8af9ceefa8..216d46de57 100644 --- a/testsuite/tests/tcplugins/all.T +++ b/testsuite/tests/tcplugins/all.T @@ -8,13 +8,9 @@ test('TcPlugin_Nullary' , 'TcPlugin_Nullary.hs' ]) ] - , multi_compile + , multimod_compile , [ 'TcPlugin_Nullary.hs' - , [ ('Definitions.hs', '') - , ('Common.hs', '') - , ('NullaryPlugin.hs', '') - ] - ,'-dynamic -package ghc' if have_dynamic() else '-package ghc'] + , '-dynamic -package ghc' if have_dynamic() else '-package ghc' ] ) # See ArgsPlugin.hs for a description of this plugin. @@ -26,13 +22,9 @@ test('TcPlugin_Args' , 'TcPlugin_Args.hs' ]) ] - , multi_compile_and_run + , multimod_compile_and_run , [ 'TcPlugin_Args.hs' - , [ ('Definitions.hs', '') - , ('Common.hs', '') - , ('ArgsPlugin.hs', '') - ] - ,'-dynamic -package ghc' if have_dynamic() else '-package ghc'] + , '-dynamic -package ghc' if have_dynamic() else '-package ghc' ] ) # See TyFamPlugin.hs for a description of this plugin. @@ -44,13 +36,9 @@ test('TcPlugin_TyFam' , 'TcPlugin_TyFam.hs' ]) ] - , multi_compile + , multimod_compile , [ 'TcPlugin_TyFam.hs' - , [ ('Definitions.hs', '') - , ('Common.hs', '') - , ('TyFamPlugin.hs', '') - ] - ,'-dynamic -package ghc' if have_dynamic() else '-package ghc'] + , '-dynamic -package ghc' if have_dynamic() else '-package ghc' ] ) # See RewritePlugin.hs for a description of this plugin. @@ -62,13 +50,9 @@ test('TcPlugin_Rewrite' , 'TcPlugin_Rewrite.hs' ]) ] - , multi_compile + , multimod_compile , [ 'TcPlugin_Rewrite.hs' - , [ ('Definitions.hs', '') - , ('Common.hs', '') - , ('RewritePlugin.hs', '') - ] - ,'-dynamic -package ghc' if have_dynamic() else '-package ghc'] + , '-dynamic -package ghc' if have_dynamic() else '-package ghc ' ] ) # See RewritePerfPlugin.hs for a description of this plugin. @@ -82,10 +66,7 @@ test('TcPlugin_RewritePerf' , collect_compiler_stats('bytes allocated', 1) , high_memory_usage ] - , multi_compile_fail + , multimod_compile_fail , [ 'TcPlugin_RewritePerf.hs' - , [ ('RewritePerfDefs.hs', '') - , ('RewritePerfPlugin.hs', '') - ] - ,'-dynamic -package ghc' if have_dynamic() else '-package ghc'] + , '-dynamic -package ghc' if have_dynamic() else '-package ghc' ] ) |