Summary:
Add a new `ReportFlag` `ReportExceptionStack`. When it is enabled, we will
include the label stack in `HaxlException`. This will allow us provide stack
in `HaxlException` in non-prof rts. The label stack can also provide details
at different level compared to the `CostCentreStack`:
* with `-fprof-auto` or `-fprof-auto-top`, we can get reasonably detailed ccs.
* label stack only works well when enough labels are added either manually or
by preprocessing.
* label stack works better for cases where the different `Haxl` computations
are constructed dynamically in some common framework, where we also create
dynamic labels.
Reviewed By: simonmar
Differential Revision: D32936619
fbshipit-source-id: 4aacd576dff062706a848a93f60d93982e4b8717
Summary:
Pull Request resolved: https://github.com/facebook/Haxl/pull/136
Adds unit test for schedulerHint in DataSource. Currently tests the TryToBatch and SubmitImmediately modes. Tests fail if
. Batch size is not equal to the no of requests in `TryToBatch` mode
. More than one request is submitted in `SubmitImmediately` mode.
Reviewed By: DylanZA
Differential Revision: D24922114
fbshipit-source-id: f786b93e9e0b7c7c731ede5fc54780d9e1b87432
Summary: Test against ghc 8.8 and 8.10 and regenerate .travis.yml
Reviewed By: babyLiyuan
Differential Revision: D23090356
fbshipit-source-id: 1d5662215f523025b9d59f297c400615c13f4ef5
Summary:
New versions are available for aeson, hashable and time. We need bump the
upper bound so that we can build haxl on ghc-8.10.
Reviewed By: rayshih
Differential Revision: D23090291
fbshipit-source-id: 58b874da0eb658e50a23fb0acb2cbcee42fdf1c7
Summary:
This unit test demonstrates 2 things:
1) It is possible for Haxl computation to be interrupted in ways that block the scheduler indefinitely
2) Calling `sanitizeEnv` on the env from such a computation allows us to reuse it for future computations. If we don't do that, future computations can still block even without any exception thrown during the 2nd run.
Reviewed By: DylanZA
Differential Revision: D22397981
fbshipit-source-id: 48dfca49ab3485693bc772ff346945779809d9e8
Summary:
Pull Request resolved: https://github.com/facebook/Haxl/pull/118
* add ability to set reporting flag for benchmarking
* add argument parser
* add a test for using lots of labels
Reviewed By: simonmar
Differential Revision: D20792436
fbshipit-source-id: c87bd8e996397cb2ef229cf59927530a4dac20df
Summary:
Pull Request resolved: https://github.com/facebook/Haxl/pull/111
Right now BackgroundFetches produce multiple FetchStats for the same batch, but it is not possible to link these together to get an idea of how big the batch was.
This introduces a field to FetchStats that can be used to link batches together as well as a utility method to do this in a default manner
Reviewed By: watashi
Differential Revision: D19469048
fbshipit-source-id: fce687c49ac4cbdc7cbd6804f37b6f120d7efad3
Summary:
Pull Request resolved: https://github.com/facebook/Haxl/pull/109
FutureFetch is unused (except for one test) and overall has not proven itself to be a useful fetch type. It adds a new waiting point (the others being BackgroundFetch and Async/Sync fetches) which can add latency. For example if all three are dispatched in one round how would the scheduler know ahead of time which one to wait on in order to make forward progress.
Reviewed By: simonmar
Differential Revision: D19410093
fbshipit-source-id: 40c900fbff9e06098acb2a21fc59b49adefadc5b
Summary: Switch to use `BasicHashTable` from `hashtables` package instead of `Data.HashMap.Strict` for `DataCache`
Reviewed By: simonmar
Differential Revision: D19219048
fbshipit-source-id: a2a8df0e715c202ca79a1f3a1c0dad133788e1eb
Summary: Bump the minimum Haxl version to GHC 8.2, which at this point is 2.5 years old but more importantly has many features that are really helpful in Haxl (such as the hs_try_put_mvar API function, which is really useful for BackgroundFetch)
Reviewed By: josefs
Differential Revision: D19327952
fbshipit-source-id: f635068fe9fb8f1d1f0d83ccbf9c3c04947183a0
Summary:
Adds the ability for one to record the function callstack within the `Haxl` monad.
The main function is `withCallGraph`, and supporting types are in `Haxl.Core.CallGraph`.
Reviewed By: watashi
Differential Revision: D14857851
fbshipit-source-id: daab97e8144ff63104ad9e79a3a792a4471e5588
Summary:
Pull Request resolved: https://github.com/facebook/Haxl/pull/99
This adds unit tests to haxl, to make sure we are tracking the outgone
fetches correctly..
Reviewed By: simonmar
Differential Revision: D14683672
fbshipit-source-id: 49a318f0b8aa38c2af154fcbe0946122e70b9565
Summary: Whoops forgot to do when I added the test file.
Reviewed By: zilberstein
Differential Revision: D14874686
fbshipit-source-id: 5bb4b83368f03e9867516b3876acb83ea8aa6852
Summary: And bump version to 2.0.1.1
Reviewed By: anubhav94N
Differential Revision: D10011092
fbshipit-source-id: 4d45f79fb4c89112d29d40f0d53a50441a443729
Summary: The MemoVar export causes a minor version bump
Reviewed By: anubhav94N
Differential Revision: D8588703
fbshipit-source-id: 8dfb5ed5f44a681810860080b8413fc61bf58c89
Summary:
minor version bump required so that I can update the Hackage package
to fix the URLs.
Reviewed By: codemiller
Differential Revision: D8057062
fbshipit-source-id: 2204d28a965df3933b7acf5b81c62b4380835e63
Summary:
This isn't pretty, but it's the least intrusive and most efficient way
I could find to do it.
The tricky part is that when doing multiple putResults in the same
child thread, we have to ensure the *last* one (and only the last one)
is putResultFromChildThread.
Reviewed By: xich
Differential Revision: D6519631
fbshipit-source-id: 1c3c40f311031ac4cc8ed82daefcb7740b91541e
Summary:
Mainly aimed at
* lowering the barrier to entry by enabling some simple use cases
* providing more example code
* providing a basis for some examples in a future blog post
Reviewed By: zilberstein
Differential Revision: D6172870
fbshipit-source-id: 9493cec7ccd78c32b54cb24923f9c574e877c529
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:
We need a release for GHC 8.2.1 compatibility:
https://github.com/facebook/Haxl/issues/70
(Note: this ignores all push blocking failures!)
Reviewed By: simonmar
Differential Revision: D5488485
fbshipit-source-id: 61ae115e7456beb1dd8855d387690e13a1e09bdc
Summary: text prior to 1.2.1.0 doesn't work because we need the Binary instance
Reviewed By: niteria
Differential Revision: D5027630
fbshipit-source-id: d6eeefb40a19ae2c0aaccaad868dc42ed4976ea5
Summary:
- `binary-0.9` is accidental major jump and is now deprecated, I'm not sure what's best to do, cabal solver should pick `-0.8.x.y.` version
- `HUnit` and `time` changes do not affect use in haxl.
Closes https://github.com/facebook/Haxl/pull/68
Differential Revision: D4843906
Pulled By: JonCoens
fbshipit-source-id: b97c78e644a170745d7a29aab5c137e86f7018be
Summary:
If this goes ok, can we have a release?
Closes https://github.com/facebook/Haxl/pull/66
Reviewed By: simonmar
Differential Revision: D4409114
Pulled By: niteria
fbshipit-source-id: 6d6e88f1cf7b9ae2d851eaa86966f2eb417b4d7e
Summary:
Alternatively we could change dependency to `aeson-compat`, which has less major version bumps (because it has smaller public API surface, yet one have to be careful .e.g. not to rely on instance implementations).
Closes https://github.com/facebook/Haxl/pull/64
Differential Revision: D4385525
Pulled By: xich
fbshipit-source-id: 72246e0f9144728e618de7bfcf983531bd3d281a
Summary: Some of the test files were not listed in haxl.cabal
Reviewed By: kuk0
Differential Revision: D3951346
fbshipit-source-id: 8e6677a728acde3713c618a6383b2de510b1ac86
Summary:
Labels which throw Haxl exceptions are recorded, but pure exceptions bubble up
and labels are lost. This test demonstrates this.
Reviewed By: simonmar
Differential Revision: D3672479
fbshipit-source-id: fab10878e7eb067e0c65bcf401d75604c333007f
Summary: Some tests were failing, but we ignored the test failures by not checking the return value from the test runner. This patch fixes both the test runner and the tests.
Reviewed By: watashi
Differential Revision: D3379609
fbshipit-source-id: 0a1278879faa5beb0f9779ddfaa622cdbf05a73f
Summary:
This collects the highest round in which a label adds a fetch, as well as
number of fetches per label per datasource. It reports these, along with
aggregated values with scuba sample of profiling data.
Aggregation for number of rounds is the maximum round of label or any of
label's children. Aggregation for number of fetches is sum.
Reviewed By: simonmar
Differential Revision: D3316018
fbshipit-source-id: 152690c7b8811d22f566437675c943f755029528