Summary:
This diff removes the scuba field as described in the task, as well as removing numRounds from Stats. This involved removing the numRounds assertion from expectRounds* functions, which I chose to rename to expectResult* (lmk if you prefer something different there).
Within Stats, I merely deleted the numRounds function. I didn't go looking for anything deeper to clean up because it looked like `rs` was used in other functions.
Reviewed By: zilberstein
Differential Revision: D8963298
fbshipit-source-id: d367b53007be03bd290222c676539680acd9f929
Summary:
Now that the Haxl 2 diff has landed, I wanted to take the opportunity to reorganise the codebase.
I split parts of `Haxl.Core.Types` out into
* `Haxl.Core.Flags`, the `Flags` type and functions
* `Haxl.Core.DataSource`: the `DataSource` class and related stuff
and I split the massive `Haxl.Core.Monad` module into smaller modules:
* the base `Haxl.Core.Monad` with the types and instances
* `Haxl.Core.Fetch`: data-fetching functionality
* `Haxl.Core.Run`: the scheduler, and `runHaxl`
* `Haxl.Core.Profile`: profiling
* `Haxl.Core.Parallel`: `pAnd` and `pOr`
* I've also moved all the memoization support into `Haxl.Core.Memo`.
This commit also fixes the build on GHC 7.8.x, 7.10.x, and 8.2.x, all the Travis builds are green again.
Closes https://github.com/facebook/Haxl/pull/79
Reviewed By: zilberstein
Differential Revision: D6030246
Pulled By: simonmar
fbshipit-source-id: 5a0dc708cf72f8ed0906f1e99000976dbfbc89e2
Summary:
This is a complete reworking of the way that Haxl schedules I/O. The
main benefits are:
* Data fetches are no longer organised into rounds, but can be
arbitrarily overlapped with each other and with computation. The
scheduler supports an arbitrary queue of work items which it can
evaluate while data-fetching is taking place in the background. To
take advantage of this, data sources must implement a new form of
`PerformFetch`, namely `BackgroundFetch`. The old forms of
`PerformFetch` are still supported, but won't benefit from any
additional concurrency.
* It is now possible to specify on a per-data-source basis whether
fetching should be optimised for batching or for latency. A request
to a data source that doesn't benefit from batching can be submitted
immediately. This is done with the new `schedulerHint` method of
`DataSource`.
Reviewed By: niteria
Differential Revision: D4938005
fbshipit-source-id: 96f12ad05ee62d62474ee4cc1215f19d0a6fcdf3
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