Commit Graph

97 Commits

Author SHA1 Message Date
Harendra Kumar
cc198c5b8d Fix gauge benchmark name matching 2021-06-08 23:54:04 +05:30
Harendra Kumar
9a98ee00d5 Bump the heap limit for tasty-bench
For Data.Array/o-1-space/generation/show and similar benchmarks.
2021-06-08 23:54:04 +05:30
Harendra Kumar
5537b0bfc2 Add --sort-by-name flag
To sort the benchmarks by name instead of sorting them by field value or
percent diff.
2021-06-08 23:54:04 +05:30
Harendra Kumar
edbb7b8010 Fix error handling, use pipefail
* Also, fix --prefix not working due to missing ";"
* Fix correct benchmark name to be printed
2021-06-08 23:54:04 +05:30
Harendra Kumar
b0fdda43d5 Fix missing benchmarks 2021-06-08 23:54:04 +05:30
Harendra Kumar
03218ad71b Cleanup, fix issues in bench.sh 2021-06-08 23:54:04 +05:30
Ranjeet Kumar Ranjan
b68baf3c51 Add support for benchmarking with tasty-bench
tasty-bench has fewer dependencies and is agile to keep up with new GHC
versions. This change is especially motivated by support for GHC 9.0.1.
gauge depends on foundation/basement which lagging much behind and seem
to be unmaintained.
2021-06-08 23:54:04 +05:30
Harendra Kumar
a7ba0701ec Add a hack to find "chart" executable
We can always use the chart executable built by any compiler version.
Sometimes the chart executable is not buildable by newer compiler
versions, in that case we can build it using another compiler and use
that.
2021-04-26 12:21:10 +05:30
Adithya Kumar
4f556e8b4d Make Parser initial of type Initial 2021-03-05 03:04:35 +05:30
Harendra Kumar
f32a16628e Fix syntax error due to bad comment 2021-03-05 01:47:02 +05:30
Harendra Kumar
37562825e9 Increase stack limit of sum-product-fold for GHC-9.0 2021-03-04 18:25:45 +05:30
Harendra Kumar
3c428a1139 Fix --help command for run-ci.sh 2021-02-20 09:55:41 +05:30
Harendra Kumar
1a51cab61a Add a script to run CIs locally using nix/packcheck 2021-02-18 18:18:35 +05:30
Harendra Kumar
d2d0e16d53 Add a ghc wrapper to invoke ghc on individual files
With all the extensions used in streamly, optimization options and
ddump-simpl options.

This is useful for compiling standalone files, when inspecting core for
perf issues.  I wish cabal could invoke ghc with environment from the
cabal file. Can it?
2021-02-15 15:41:05 +05:30
Harendra Kumar
cdccb78b7e Add support for --with-compiler 2021-02-10 19:19:53 +05:30
Harendra Kumar
6c02648b7d Use fusion-plugin by default 2021-02-10 18:49:58 +05:30
Harendra Kumar
d1ab6e59d6 Rename cabal-build-flags to cabal-build-options 2021-02-10 18:49:58 +05:30
Harendra Kumar
2131682e9a Update bin/test.sh cli help, add it to test/README.md 2021-02-10 02:00:33 +05:30
Pranay Sashank
5c018c7e45 Rename Data.Array.Storable.Foreign to Data.Array.Foreign.
Closes #854.
2021-02-01 21:31:06 +05:30
Harendra Kumar
e38dba9d8a Update stack limits for Prelude.Rate, Prelude.Ahead 2021-01-27 19:08:13 +05:30
Harendra Kumar
6a33a88980 Increase time-limit from 0 to 0.01
In the "reverse'" benchmark the GC stats were showing as 0 because no
GC occurred in 1 iteration.
2021-01-27 19:08:13 +05:30
Anurag Hooda
c671f2e850 fix some stack space overflows 2021-01-08 00:44:25 +05:30
Harendra Kumar
00a2f7b1f5 Use a basePort var, rename test, add to targets.sh
fix hlint
small cleanups
2021-01-04 02:30:20 +05:30
Harendra Kumar
c3b506b68b Refactor, cleanup, hlint - fold and handle tests 2021-01-04 01:26:39 +05:30
Harendra Kumar
c0065208f2 Fix reporting, use only existing files in hpc report 2021-01-01 00:26:49 +05:30
Harendra Kumar
a5a6efc83a Remove empty tix dirs
To make hpc-coveralls work, because it expects a tix file in all dirs.
2021-01-01 00:26:49 +05:30
Harendra Kumar
a1111f33b2 Remove redundant echo output 2020-12-31 01:12:50 +05:30
Harendra Kumar
76eea18dba Initialize COVERAGE with a valid value
Otherwise comparisons in conditions fail.
2020-12-31 01:12:50 +05:30
Harendra Kumar
0c29627667 Fix target groups not working correctly
RUNNING_BENCHMARKS/RUNNING_TESTS variables were getting cleared up by
set_common_vars. Also, all_grp is a function and should be treated
differently than variables.
2020-12-30 20:42:50 +05:30
Harendra Kumar
f25a1dd28e Use test.sh to generate coverage info
cabal does not work with coverage when tests are in a different package.
2020-12-28 23:56:18 +05:30
Harendra Kumar
002551e55f Support hpc-coveralls for coverage upload 2020-12-28 23:56:18 +05:30
Harendra Kumar
4dc01677c7 Add coverage option to test.sh script 2020-12-28 23:56:18 +05:30
Harendra Kumar
f6d05d3f52 Refactor bench.sh to use build-lib.sh 2020-12-28 23:56:18 +05:30
Harendra Kumar
58cb9caffa Move the bench.sh script to "bin" dir 2020-12-28 23:56:18 +05:30
Harendra Kumar
299bdffdd6 Add a script to run tests
This allows us to build and run individual tests or groups of tests. The
script is supposed to be extended to run hpc/coverage manually after
running the tests.

Note: cabal fails to run coverage if the test module is separated from
the library.
2020-12-28 23:56:18 +05:30
Harendra Kumar
c216af0b09 Break Benchmark.Prelude.Serial into smaller modules
This module took a lot of time and 4GB RAM to compile. Its now broken
into smaller module that can be compiled in less than 512 MB RAM.

The memory limits are set based on a 3-pass fusion-plugin.
2020-11-30 06:51:00 +00:00
Harendra Kumar
0c570febdd Add scripts to generate hscope db and tags 2020-11-26 09:27:44 +05:30
Harendra Kumar
c213835524 Use a "bash" shell from PATH
In case of nix environment we may be using bash from non-standard path.
2020-10-24 15:55:21 +05:30
Harendra Kumar
ec97cec4d2 Fix the backtrack buffer management for fromParserK
This commit results in worse performance because now we are double
buffering once in ParserD and once in ParserK. This can potentially be
fixed but would require bigger changes to unify the backtracking buffer
management for ParserD and ParserK.
2020-08-02 16:26:46 +05:30
Harendra Kumar
37bcdcd34d Add FileSystem.Handle benchmark, use --time-limit 0
In the quick mode we anyway use --include-first-iter, we should not be running
many iterations, one iteration is enough, anyway allocations do not change
across iterations. We can use this for super quick comparison of benchmarks.
2020-07-09 17:40:27 +05:30
Harendra Kumar
7229844f32 Increase stack size for transformer benchmarks 2020-07-03 00:24:58 +05:30
Harendra Kumar
3818db8355 Increase stack limit for StreamK/toList benchmark 2020-07-02 18:16:33 +05:30
Harendra Kumar
60d322812b Combine Yield and YieldB constructors
Yield 0: now means a partial result is available
Yield n: means a partial result is available, and we need to backtrack by n
elements.
2020-06-24 21:06:56 +05:30
Harendra Kumar
55d49bd50c Optimize Functor/Applicative/Monad etc for serial
Some of the benchmarks were order of magnitude off due to missing INLINE for
type class operations. Now, all of them are in reasonable limits. Benchmarks
affected for serial streams:

* Functor, Applicative, Monad, transformers

We need to do a similar exercise for other types of streams and for
folds/parsers as well.
2020-06-23 13:41:41 +05:30
Harendra Kumar
b4cef11d19 Add iterative benchmarks for Functor/transformers
* Also factor out the existing iteration utilities and use the same everywhere
2020-06-23 13:01:25 +05:30
Harendra Kumar
1a331cb402 Add more benchmarks for applicative/monad
Separate the applicative and monad benchmark groups
Complete benchmarks for all type class operations
2020-06-21 15:15:55 +05:30
Harendra Kumar
129ebaf82c Refactor Prelude benchmarks
* Now benchmark modules correspond to source modules. The Prelude module in
  source corresponds to several modules one for each stream type.

* Benchmarks in the same order/groupings as they appear in source

* All benchmarks now have division according to space complexity

* Refactoring reduces a lot of code duplication especially the stream
  generation and elimination functions.

* The RTS options are now completely set in the shell script to run the
  benchmarks.

* RTS options can be set on a per benchmark basis. RTS options work correctly
  now.

* The set of streaming/infinite stream benchmarks is now complete and we can
  run all such benchmarks coneveniently.

* Benchmark "quick"/"speed" options can now be specified on a per benchmark
  basis. Longer benchmarks can have fewer iterations/quick run time.

* Benchmarks are grouped in several groups which can be run on a per group
  basis. Comparison groups are also defined for convenient comparisons of
  different modules (e.g. arrays or streamD/K).

* The benchmark namespaces are grouped in a consistent manner. Benchmark
  executables have a consistent naming based on module names.
2020-06-07 01:48:05 +05:30