Summary:
It isn't used by anything else in core, it's really a local thing that
we're using in our own data sources, so moving it out to avoid
confusing Haxl open-source users.
Test Plan: contbuild
Reviewed By: watashi@fb.com
Subscribers: anfarmer, kjm, jlengyel, watashi, smarlow, akr, bnitka, jcoens
FB internal diff: D2516897
Signature: t1:2516897:1444236927:0e6e204a0f4393e18931dea2e7ddba83e6123ba9
Summary:
Use the smart view technique from [1] to avoid quadratic behavior of
left-nested binds in the continuation of Blocked results. This makes the seql
benchmark linear (and quite fast).
(See before-and-after benchmark results in P20020178)
[1] http://dl.acm.org/citation.cfm?id=2784743
Test Plan:
Ran the Haxl core tests with `fbmake runtests`. Also compared the
microbenchmarks in MonadBench. (see P20020178)
End-to-end test results for top 25 contexts:
https://www.facebook.com/pxlcld/mPXZhttps://www.facebook.com/pxlcld/mPZ2https://www.facebook.com/pxlcld/mPZ0https://www.facebook.com/pxlcld/mPZ1
Based on those, not sure what to do. It does seem like a very slight improvement, but not strictly improving. Thoughts?
Reviewed By: smarlow@fb.com
Subscribers: ldbrandy, kjm, jlengyel, memo, watashi, smarlow, akr, bnitka, jcoens
FB internal diff: D2438616
Tasks: 8432911
Signature: t1:2438616:1442568800:bf2d1a18819c0ceeb6ea097379ec4bbc6364c0c2
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
Summary:
memo had a `Show` constraint on both the keys and values, to support
`dumpCacheAsHaskell`. However
* We don't print out the memo cache in `dumpCacheAsHaskell`, only the
data cache, so we don't need memo entries to be showable.
* Requiring `Show` to memoize something is occasionally annoying
* Passing those `Show` dictionaries probably has some overhead
Test Plan:
* unit tests pass
* Ran `haxl/core/tests/Bench.hs` to measure the perf of the datacache,
saw no difference.
Reviewed By: kjm@fb.com
Subscribers: ldbrandy, kjm, jlengyel, memo, watashi, smarlow, akr, bnitka, jcoens
FB internal diff: D2336437
Tasks: 7779904
Signature: t1:2336437:1439376418:cca2aee6ce22e4320206a1212f6f81fda6f6ae49
Summary: New withEnv function allows the user to override/ignore the Env set by runHaxl.
Test Plan: build
Reviewed By: smarlow@fb.com
Subscribers: ldbrandy, kjm, jlengyel, memo, watashi, smarlow, akr, bnitka, jcoens, mpawlowski
FB internal diff: D2255490
Signature: t1:2255490:1437399211:705f6aa9e14105618d1795145178aff6eff3d858
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
The function performFetches collects statistics about the requests
performed in each round. However, the list is not evaluated (unless
tracing is on), leading to an accumulation of thunks. Forcing the list
via deepseq prevents this.
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
Summary:
Adds traceEventIO in right places to get pretty fetching visualizations.
These should be a no-op when compiled with eventlog disabled, but
I haven't measured to see if there is any actual overhead yet.
Test Plan:
compiled, ran replay and endtoend with no problems
waiting on full perf results to check for overhead
Reviewed By: smarlow@fb.com
Subscribers: trunkagent, ldbrandy, watashi, smarlow, akr, bnitka, jcoens, anfarmer
FB internal diff: D1666727
Tasks: 5564760, 5289531, 5289404
Signature: t1:1666727:1415714188:1e4b2322c8ae15c8d3552ec2bc290df94a683184
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
Summary: Add flags to control the report level (how much stats we will collect) in Haxl
Test Plan: runtests
Reviewed By: jon.coens@fb.com
Subscribers: ldbrandy, watashi, smarlow, akr, bnitka, jcoens
FB internal diff: D1509184
Tasks: 4589842
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
Summary:
See copious comments in the source for details. The problem with the
previous approach was that it was too easy to lose the continuation that
contained the memo table update when exceptions are flying around, and
losing that continuation always results in an infinite loop. This
solution is more robust, because we can never lose a continuation, the
worst that could happen (and it shouldn't happen) is that we do a bit of
repeated work.
Test Plan: unit tests, my infinite loop repro case is fixed
Reviewed By: jon.coens@fb.com
Subscribers: ldbrandy, smarlow, akr, bnitka, jcoens
FB internal diff: D1427283
Tasks: 3734942
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
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