1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 00:42:33 +03:00
Commit Graph

76 Commits

Author SHA1 Message Date
Rob Rix
d5cc356a8a
Map results to unit in evaluateProject. 2019-10-23 11:46:33 -04:00
Rob Rix
e9ca7cb1b8
Select an abstract parser. 2019-10-23 11:45:45 -04:00
Rob Rix
be51d3139f
Align. 2019-10-23 11:40:37 -04:00
Rob Rix
b8ff23f2c5
Inline the evaluators. 2019-10-23 11:40:23 -04:00
Rob Rix
46094f3e59
Fix which project we eval. 2019-10-23 11:39:50 -04:00
Rob Rix
9dcfbd8f2c
Spacing. 2019-10-23 11:39:30 -04:00
Rob Rix
d6d16c1c0d
Factor justEvaluating into evaluateProject. 2019-10-23 11:38:10 -04:00
Rob Rix
2dffafa12f
Type applications. 2019-10-23 11:36:59 -04:00
Rob Rix
97a31acc7a
Don’t require an NFData instance for the terms. 2019-10-23 11:36:36 -04:00
Rob Rix
ee539d8594
Fix some missing imports. 2019-10-22 17:12:58 -04:00
Rob Rix
10ee109dae
Try to correct the constraints for the benchmarks. 2019-10-22 17:04:31 -04:00
Rob Rix
a78cf3c7d2
Add some missing constraints. 2019-10-22 16:22:41 -04:00
Rob Rix
bf82196315
Abstract the benchmarks over the term type. 2019-10-21 17:37:01 -04:00
Rob Rix
2e8e65a13b
Rename VertexDeclaration to VertexDeclaration1. 2019-10-18 13:32:15 -04:00
Rob Rix
30b0f31020
Simplify VertexDeclaration to avoid the extra type parameter. 2019-10-18 13:18:02 -04:00
Patrick Thomson
df96f43acd Make findFilesInDir use pathtype. 2019-10-11 19:24:53 -04:00
Patrick Thomson
54394d61c8 Move around and correct benchmarks. 2019-10-04 12:37:24 -04:00
Patrick Thomson
284fc30f1c Reorganize benchmarks. 2019-10-04 11:25:34 -04:00
Patrick Thomson
65060868bc Make benchmarks operate and switch to gauge.
I find myself wanting to benchmark some I/O code, so I decided to look
at our benchmark suite, to find that it had bitrotted somewhat. This
patch brings it back up to working status, switches to `gauge` (which
is more accurate than `criteron` and incurs fewer dependencies), and
sprinkles some typed paths on there.
2019-09-27 13:18:30 -04:00
Patrick Thomson
ac543651ee Add NFData instances to enable more accurate benchmarking.
Because we're getting serious about benchmarking in the run-up to
Windrose, it's time to bring in the `deepseq` package to ensure that
benchmarks can fully evaluate the result of a test case.

The `deepseq` package provides an `NFData` typeclass:

```
class NFData a where
  rnf :: a -> ()
```

Instances use the `seq` combinator to ensure that the argument to
`rnf` is fully evaluated, returning (). If there is a `Generic`
instance for `a`, the implementation can be omitted. This patch adds
NFData for every syntax node, graph vertex, environment data
structures, and exceptions. It is long, but the work is very
straightforward, so don't panick.

The benchmark suite (`stack bench`) now produces more accurate
results. The benchmarks previously mimicked `rnf` by calling `show` on
the result of an evaluation or graph construction; now that we have
actual `NFData` instances we can use the `nfIO` combinator from
criterion. This has sped up the evaluation benchmarks and reduced
their memory consumption, while it has slowed down the call graph
benchmarks, as those benchmarks weren't evaluating the whole of the
graph.

Unfortunately, this patch increases compile times, as we have to
derive a few more Generic instances. I wish this weren't the case, but
there's little we can do about it now. In the future I have some plans
for how to reduce compile time, and I bet that those gains will at
least nullify the speed hit from this patch.

Now that we have NFData instances for every data type, we can start
benchmarking assignments, in preparation for fixing #2205.

This patch also pulls in updates to `effects` and `fastsum` that add
appropriate NFData instances for the data they vend.
2018-10-17 14:08:47 -04:00
Rick Winfrey
00693a54ee Update bench to work again 2018-08-13 15:42:42 -07:00
Patrick Thomson
bad6e9f53a Fix benchmarks and add benchmark for call graph.
Preyy straightforward.
2018-07-18 11:38:28 -04:00
Patrick Thomson
926e81b8a0 Fix benchmarks.
The interface in Semantic.Util had changed.
Also removes the old `evalRubyFile` and `evalPythonFile` functions,
since they did not typecheck in ghci and do nothing that the project
equivalents don't.
2018-05-04 13:49:37 -04:00
Patrick Thomson
6d5561f9b9 fix misalignment 2018-03-12 10:51:07 -04:00
Patrick Thomson
4378fa5657 add comment 2018-03-08 13:18:36 -05:00
Patrick Thomson
5ffa873279 add script/bench 2018-03-08 10:13:26 -05:00
Patrick Thomson
1ea97534b6 print so that we know everything is evaluated 2018-03-07 19:56:54 -05:00
Patrick Thomson
be2d90f029 add ruby 2018-03-07 19:47:23 -05:00
Patrick Thomson
0ac705b0f5 flesh out some benchmarks 2018-03-07 19:34:20 -05:00
Timothy Clem
c862b7bcf5 Remove benchmark target 2017-04-10 15:04:45 -07:00
Rob Rix
cfbe7e2108 🔥 the generative benchmark stuff. 2017-01-10 14:46:07 -05:00
Rob Rix
a5e7f584c8 hlint insists that this is redundant. 2017-01-09 16:15:36 -05:00
Rob Rix
d2709f6cab First pass at generative testing using leancheck. 2017-01-09 16:12:25 -05:00
Timothy Clem
6cbfa91475 Try out moving project around 2016-10-05 16:17:46 -07:00
Rob Rix
114e203c4a Handle rounding error by taking exactly n measurements. 2016-06-06 17:20:00 -04:00
Rob Rix
9eff3053ec Traverse up to the default size in n steps. 2016-06-06 17:19:42 -04:00
Rob Rix
927ee4345f Benchmark SES over fixed intervals. 2016-06-06 17:17:37 -04:00
Rob Rix
a7dd94f9d7 Compute element cost as sums of string length. 2016-06-06 17:17:19 -04:00
Rob Rix
b45bc321b2 Compute SES over lists of strings. 2016-06-06 17:16:52 -04:00
Rob Rix
2648406b34 Generalize generativeBenchmark over Gen a. 2016-06-06 17:15:51 -04:00
Rob Rix
ef57f3aece Add a baseline benchmark of SES. 2016-06-06 15:32:38 -04:00
Rob Rix
95eabb8b5d Add an NFData instance for Patch. 2016-06-06 15:32:16 -04:00
Rob Rix
893f53fa08 🔥 some unused setup from the numberedRows benchmark. 2016-06-06 13:09:17 -04:00
Rob Rix
44a1599afa 🔥 redundant imports. 2016-06-06 13:06:09 -04:00
Rob Rix
de41789aab 🔥 the pointless numberedRows benchmark. 2016-06-06 13:06:04 -04:00
Rob Rix
29a725b125 Move ArbitraryDiff into semantic-diff proper. 2016-06-06 12:07:07 -04:00
Rob Rix
8780ea3f26 Move the Arbitrary instances for Join (,) and Join These into semantic-diff proper. 2016-06-06 11:50:45 -04:00
Rob Rix
4eb76ff3a3 Move the Arbitrary instance for Data.These into semantic-diff proper. 2016-06-06 11:46:30 -04:00
Rob Rix
378b577175 Move the Arbitrary instance for Patch into semantic-diff proper. 2016-06-06 11:43:38 -04:00
Rob Rix
3d4a348072 Depend on semantic-diff’s definition of ArbitraryTerm in the benchmarks. 2016-06-01 09:15:15 -04:00