forked from mdcallag/linkbench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to throttle request rate per thread.
Summary: Simulate poisson process with inter-arrival times exponentially distributed. Includes unit tests for request rate functionality. Also work on consolidating random number generation. The random number generation in the original implementation creates many Random() instances, each of which is seeded with the current time at construction time. This is not really ideal as the Java RNG is fast but not particularly good quality and the stream of numbers from a single RNG is likely to be better quality that that from many RNGs with correlated seeds. Also working towards deterministic random number generation, where a single initial seed determines the entire request workload. This allows workloads and tests to be reproducible. That seed is used for a high-quality but slow RNG, which then generates seeds for new faster RNGs that can be passed to threads in such a way that the calls to each RNG always occur in the same order. The request workload is now deterministic except for the id1 selection algorithm in RealDistribution, which is inherently non-deterministic because it mutates arrays shared between threads. Test Plan: ant test To check deterministm, ran small request workload multiple types, checked that the count of each type of operation stayed the same (to check determinism) Reviewers: dhruba Reviewed By: dhruba CC: vamsi Differential Revision: https://reviews.facebook.net/D4695
- Loading branch information
Tim Armstrong
committed
Aug 17, 2012
1 parent
d2c72be
commit 9259d55
Showing
11 changed files
with
365 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.