Commit Graph

13 Commits

Author SHA1 Message Date
Jake Lengyel
c4ca10b6ea Add (de)serialization functions to most datasources
Summary: Add serialization and deserialization functions to non-risk datasources that don't require special treatment (like CacheClient, etc), for use with D2628780

Reviewed By: simonmar

Differential Revision: D2645436

fbshipit-source-id: 2777dbfbb11528bc079e2e82e88ebbdc880a8914
2016-05-31 01:20:38 -07:00
Gergely Szilvasy
3e78756034 Remove TARGETS files 2016-05-27 08:22:40 -07:00
Simon Marlow
037de9c594 Overhaul docs; bump to 0.3.0.0; add changelog
Summary: Tidy everything up in preparation for a Hackage reelase

Test Plan: cabal test; unit tests

Reviewed By: kjm@fb.com

Subscribers: anfarmer, kjm, jlengyel, watashi, smarlow, akr, bnitka, jcoens

FB internal diff: D2516904

Signature: t1:2516904:1444297290:52077660599ab126ec8a3e4530808db7c15d1876
2015-10-12 06:23:49 -07:00
Simon Marlow
2d37f76bd4 Add a benchmark for basic Haxl monad patterns
Summary:
I'm using this to test variants of the monad.  In particular, the
current monad displays O(n^2) performance with the seql version of
this benchmark. This is a well-studied problem, see for example

"Reflection without remorse: revealing a hidden sequence to speed up
monadic reflection" (van der Ploeg / Kiselyov, Haskell '14)

Test Plan:
Built it and ran it a few times
unit tests still work

Reviewed By: bnitka@fb.com

Subscribers: ldbrandy, kjm, jlengyel, memo, watashi, smarlow, akr, bnitka, jcoens

FB internal diff: D2419419

Signature: t1:2419419:1441640727:9f5f82212c829fcbf2e8c063d4dbd0db495b0ba2
2015-10-07 01:16:22 -07:00
Simon Marlow
dea379f271 (>>) should be implemented as (*>)
Test Plan: new unit test

Reviewed By: akr@fb.com

Subscribers: ldbrandy, memo, watashi, smarlow, akr, bnitka, jcoens

FB internal diff: D2146859

Signature: t1:2146859:1434027756:806eb07efc3282857b7d2400c4b10b949495b476
2015-10-07 01:06:49 -07:00
Simon Marlow
dfd8a4655e A haxl test for ApplicativeDo
Summary:
Test that the ApplicativeDo extension batches things correctly in the
Haxl monad.

Test Plan: beholdunittests

Reviewed By: bnitka@fb.com

Subscribers: ldbrandy, memo, watashi, smarlow, akr, bnitka, jcoens

FB internal diff: D2039149

Tasks: 5504687

Signature: t1:2039149:1430501733:98fd1cf0f69663d6db3b07c3aed6e261ae9884d6
2015-10-07 01:06:35 -07:00
Jake Lengyel
9d8fe2c6aa Move memo to haxl/core
Summary: Move the functionality of memo to haxl/core, while retaining a Haxl wrapper in SI.

Test Plan: fbconfig -r sigma/haxl && fbmake runtests_opt

Reviewed By: smarlow@fb.com

Subscribers: ldbrandy, memo, watashi, smarlow, akr, bnitka, jcoens, wmay

FB internal diff: D1996371

Tasks: 4601157

Signature: t1:1996371:1429180518:6759e4dc2444bd942cde145d9de945430b3cba7e
2015-10-07 00:57:48 -07:00
Simon Marlow
c67b7af2e0 Don't drop async exceptions (e.g. AllocationLimitExceeded)
Summary:
Turning IO monad exceptions into Haxl monad exceptions can result in the
IO monad exception being lost, which is what was happening to our
AllocationLimitExceeded exceptions.  See the comment with
rethrowAsyncExceptions for more details.

See also D1870627

Test Plan:
P19741543 is a request that blows the alloc limit but wasn't being
caught before.

Reviewed By: akr@fb.com

Subscribers: ldbrandy, memo, watashi, smarlow, akr, bnitka, jcoens

FB internal diff: D1870631

Tasks: 6240444

Signature: t1:1870631:1424867073:d03bd0368ee968cecbcc5a0f654772b6f0eaf147
2015-03-11 12:41:38 -07:00
Zejun Wu
668a8adc2e Collect time in each data sources in each round
Summary: Collect time in each data sources in each round

Test Plan:
test in haxlsh
test the overhead in replay

Reviewed By: smarlow@fb.com

Subscribers: anfarmer, ldbrandy, watashi, smarlow, akr, bnitka, jcoens

FB internal diff: D1521346

Tasks: 4589842
2015-02-06 14:47:53 -08:00
Zejun Wu
7411284239 Update exposed-modules in haxl.cabal
Summary:
Haxl.Core.Env and Haxl.Core.Fetch were collapsed into Haxl.Core.Monad in
D1427283. Update haxl.cabal to reflect this and use PatternGuards to
suppress warnings.

Test Plan: ~/local/haxl-github $ cabal test

Reviewed By: jon.coens@fb.com

Subscribers: ldbrandy, smarlow, akr, bnitka, jcoens

FB internal diff: D1441939
2014-07-17 13:02:09 -07:00
Simon Marlow
ca83d6070c Update the DataCache strictly
Summary:
We weren't forcing the DataCache after inserting a new element, which
meant that an error would appear when next using the cache, rather than
when we insert the element.

Test Plan: new unit test

Reviewed By: bnitka@fb.com

Subscribers: ldbrandy, smarlow, akr, bnitka, jcoens

FB internal diff: D1420686

Tasks: 4637866
2014-07-17 13:02:02 -07:00
Simon Marlow
2f4d6336b2 Add catchIf
Summary: Useful for catching multiple kinds of exception with a single handler.

Test Plan: haxl/core unit tests

Reviewed By: jon.coens@fb.com

Subscribers: ldbrandy, jonp, smarlow, akr, bnitka, jcoens

FB internal diff: D1387298

Tasks: 4526990, 3727129
2014-07-17 13:01:53 -07:00
Simon Marlow
74a3874f0b Initial open source import 2014-06-10 02:47:59 -07:00