71 Commits
Author SHA1 Message Date
John MacFarlane 03630a2c6e Update copyright dates to 2024. 2024-04-25 18:16:49 -07:00
John MacFarlane 61314a02df Benchmark: use standalone documents for reader tests.
Otherwise typst reader test fails.

Note: this means that we are now parsing longer documents,
so bench results on readers won't be comparable to before.
2023-12-10 09:53:40 -08:00
Albert Krewinkel b55cd83a60 Update copyright years, it's 2023! 2023-01-10 20:28:27 +01:00
John MacFarlane e26c8eca69 Got benchmarks compiling with new API. 2022-10-13 23:36:25 -07:00
Albert Krewinkel b7a44f9d19 Copyright notices: update for 2022 2022-01-02 11:59:22 -08:00
John MacFarlane c6e5cf2e74 Benchmark improvements.
* Build `+RTS -A256m -RTS` into default ghc-options for benchmark,
  so we don't have to specify this separately on the command line.
  This is necessary to get accurate benchmark results; otherwise
  we are largely measuring garbage collecting, some not related
  to the current benchmark.
* Switch back from gauge to tasty-bench.
* Allow specifying BASELINE file in 'make bench' for comparison
  (otherwise the latest is chosen by default).
* Remove obsolete reference to weigh-pandoc from CONTRIBUTING.md.
* Remove `-Rghc-timing` from 'make bench'.
2021-03-17 13:34:17 -07:00
John MacFarlane 1ef3534328 Increase heap space in runtime for benchmarks.
Otherwise we're essentially benchmarking garbage collecting,
which can give very inconsistent results.
2021-03-16 15:59:50 -07:00
John MacFarlane ff0fcedcb3 Switch to gauge for now for benchmarks.
tasty-bench is displaying odd behavior, with different
timings depending on the `--pattern` specified.
2021-03-15 22:50:18 -07:00
Bodigrim d94f9b930a Force readFile in benchmarks early 2021-03-15 18:50:21 -07:00
John MacFarlane d7cfa0ef4c Remove weigh-pandoc.
It's not really useful any more, now that our regular
benchmarks include data on allocation.
2021-02-22 22:10:20 -08:00
John MacFarlane 36e745c678 Benchmark improvements.
+ Run writer benchmarks for binary formats too.
+ Alphabetize benchmarks.
+ Don't run benchmarks for bibliography formats
  (yet; we need a special input for them).
2021-02-20 00:28:10 -08:00
John MacFarlane 1954e894b4 Clean up benchmark code.
Now we can do patterns using `-p blah'.
2021-02-13 00:14:49 -08:00
Albert Krewinkel d202f7eb77 Avoid unnecessary use of NoImplicitPrelude pragma (#7089) 2021-02-07 10:02:35 -08:00
John MacFarlane defad03ce1 Remove superfluous import 2021-02-02 14:46:59 -08:00
John MacFarlane fe06437ba4 Use tasty-bench instead of criterion for benchmarks.
It is much lighter-weight.
2021-01-30 18:01:14 -08:00
Albert Krewinkel 4f34345867 Update copyright notices for 2021 (#7012) 2021-01-08 09:38:20 -08:00
Christian Despres cae155b095 Fix hlint suggestions, update hlint.yaml (#6680)
* Fix hlint suggestions, update hlint.yaml

Most suggestions were redundant brackets. Some required
LambdaCase.

The .hlint.yaml file had a small typo, and didn't ignore camelCase
suggestions in certain modules.
2020-09-13 07:48:14 -07:00
Nikolay Yakimov c28cff66b3 [Bench] Benchmark bytestring readers 2020-07-07 14:44:57 +03:00
John MacFarlane 4c3db9273f Apply linter suggestions. Add fix_spacing to lint target in Makefile. 2020-02-07 09:08:22 -08:00
despresc 90e436d496 Switch to new pandoc-types and use Text instead of String [API change].
PR #5884.

+ Use pandoc-types 1.20 and texmath 0.12.
+ Text is now used instead of String, with a few exceptions.
+ In the MediaBag module, some of the types using Strings
  were switched to use FilePath instead (not Text).
+ In the Parsing module, new parsers `manyChar`, `many1Char`,
  `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`,
  `mantyUntilChar` have been added: these are like their
  unsuffixed counterparts but pack some or all of their output.
+ `glob` in Text.Pandoc.Class still takes String since it seems
  to be intended as an interface to Glob, which uses strings.
  It seems to be used only once in the package, in the EPUB writer,
  so that is not hard to change.
2019-11-12 16:03:45 -08:00
John MacFarlane ebea74dc35 Fix benchmarks so they compile again. 2019-09-29 18:29:49 -07:00
John MacFarlane 8959c44e6a Got benchmarks working with ipynb. 2019-08-25 14:24:31 -07:00
Albert Krewinkel 37a82b0b11 Add missing copyright notices and remove license boilerplate (#5112)
Quite a few modules were missing copyright notices.

This commit adds copyright notices everywhere via haddock module
headers.  The old license boilerplate comment is redundant with this and has
been removed.

Update copyright years to 2019.

Closes #4592.
2019-02-04 13:52:31 -08:00
John MacFarlane 2018f41193 Update benchmarks for ghc 8.6.1. 2018-10-13 23:13:53 -07:00
John MacFarlane 48f0e73c55 Added Prelude imports to sources in benchmark and trypandoc. 2018-03-18 11:52:40 -07:00
Albert Krewinkel 0d935bd081 Update copyright notices to include 2018 2018-01-05 20:39:12 +01:00
John MacFarlane e0cf8e64b5 Improve benchmarks.
Previously we weren't setting the default extensions
properly, so e.g. 'markdown' wasn't being tested with
pandoc markdown extensions.
2017-12-30 14:26:13 -08:00
John MacFarlane 07b06cb6e6 Improved benchmark argument parsing.
You can now say 'make bench BENCHARGS="markdown latex reader"'
and both the markdown and latex readers will be benchmarked.
2017-12-30 11:22:55 -08:00
John MacFarlane 6afdc89699 Remove redundant import. 2017-12-28 21:51:07 -08:00
John MacFarlane 12b792ba73 Revised benchmark so it doesn't use FileTree constructor. 2017-12-28 21:21:36 -08:00
John MacFarlane 1e1a7a9b83 Fixed warnings. 2017-10-29 15:19:49 -07:00
Kolen Cheung 0b09409385 update years in copyright 2017-10-26 22:57:13 -07:00
John MacFarlane 710bb18443 Fixed name shadowing in benchmark. 2017-06-19 23:42:27 +02:00
John MacFarlane 49830555fa Removed redundant import. 2017-06-11 07:45:35 +02:00
John MacFarlane fa719d0264 Switched Writer types to use Text.
* XML.toEntities: changed type to Text -> Text.
* Shared.tabFilter -- fixed so it strips out CRs as before.
* Modified writers to take Text.
* Updated tests, benchmarks, trypandoc.

[API change]

Closes #3731.
2017-06-11 00:46:31 +02:00
John MacFarlane 25bfa26554 Fixed weigh-pandoc for Text readers. 2017-06-10 21:10:52 +02:00
John MacFarlane f43504f9f4 Fixed benchmark to work with Text readers. 2017-06-10 20:57:38 +02:00
John MacFarlane 2827570c6a Fixed weigh-pandoc so it compiles again. 2017-03-15 15:00:17 +01:00
Or Neeman fa43e36449 Fix stale references to tests directory (#3469)
Some of the benchmarks were failing due to references to files in the
`tests` directory, which is now called `test`.  A search found other
references to it also.  This commit updates all these references.
2017-02-25 10:31:40 +01:00
John MacFarlane 86b9a51ee3 benchmark: allow benchmark arguments.
These pattern match: so, '--benchmark-arguments "markdown reader"'
will only benchmark the markdown reader; with just "markdown" it
will do the writer too; with no arguments all benchmarks are run.
2017-01-27 11:29:26 +01:00
John MacFarlane 8a61d943f5 Fix up benchmarks so they compile. 2017-01-27 11:15:55 +01:00
John MacFarlane 35699ee533 Fixed up weigh-pandoc and benchmark-pandoc so they build. 2017-01-25 17:07:41 +01:00
John MacFarlane 478e15dc3b Removed unused import. 2016-11-30 14:53:22 +01:00
John MacFarlane aabf10b8bd Added weigh-pandoc for memory usage diagnostics.
See #3169.
2016-11-18 14:03:33 +01:00
John MacFarlane 3e005aa413 Fixed benchmark for new API. 2015-12-14 20:34:53 -08:00
John MacFarlane 23b693c029 Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."
This reverts commit c423dbb5a3.
2015-11-09 10:08:22 -08:00
John MacFarlane c423dbb5a3 Use -XNoImplicitPrelude and 'import Prelude' explicitly.
This is needed for ghci to work with pandoc, given that we
now use a custom prelude.

Closes #2503.
2015-11-08 16:56:59 -08:00
John MacFarlane 82b3e0ab97 Use custom Prelude to avoid compiler warnings.
- The (non-exported) prelude is in prelude/Prelude.hs.
- It exports Monoid and Applicative, like base 4.8 prelude,
  but works with older base versions.
- It exports (<>) for mappend.
- It hides 'catch' on older base versions.

This allows us to remove many imports of Data.Monoid
and Control.Applicative, and remove Text.Pandoc.Compat.Monoid.

It should allow us to use -Wall again for ghc 7.10.
2015-10-14 09:09:10 -07:00
John MacFarlane 59193d81fb Removed unneeded imports in benchmark program. 2015-10-09 21:15:18 -07:00
John MacFarlane 70ebccf93b Updated benchmark program. 2015-10-09 18:08:47 -07:00