rocksdb/db_stress_tool
Zhichao Cao fbda25f57a db_stress: generate the key based on Zipfian distribution (hot key) (#6163)
Summary:
In the current db_stress, all the keys are generated randomly and follows the uniform distribution. In order to test some corner cases that some key are always updated or read, we need to generate the key based on other distributions. In this PR, the key is generated based on Zipfian distribution and the skewness can be controlled by setting hot_key_alpha (0.8 to 1.5 is suggested). The larger hot_key_alpha is, the more skewed will be. Not that, usually, if hot_key_alpha is larger than 2, there might be only 1 or 2 keys that are generated. If hot_key_alpha is 0, it generate the key follows uniform distribution (random key)

Testing plan: pass the db_stress and printed the keys to make sure it follows the distribution.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6163

Differential Revision: D18978480

Pulled By: zhichao-cao

fbshipit-source-id: e123b4865477f7478e83fb581f9576bada334680
2019-12-16 14:01:58 -08:00
..
batched_ops_stress.cc cmake: do not build tests for Release build and cleanups (#5916) 2019-12-13 12:48:06 -08:00
cf_consistency_stress.cc db_stress: Some code style improvements (#6137) 2019-12-09 14:38:42 -08:00
CMakeLists.txt Add an option to the CMake build to disable building shared libraries (#6122) 2019-12-10 15:20:50 -08:00
db_stress.cc Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_common.cc db_stress: generate the key based on Zipfian distribution (hot key) (#6163) 2019-12-16 14:01:58 -08:00
db_stress_common.h db_stress: generate the key based on Zipfian distribution (hot key) (#6163) 2019-12-16 14:01:58 -08:00
db_stress_driver.cc Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_driver.h Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_gflags.cc db_stress: generate the key based on Zipfian distribution (hot key) (#6163) 2019-12-16 14:01:58 -08:00
db_stress_listener.h Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_shared_state.cc Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_shared_state.h Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_stat.h Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_test_base.cc Add long-running snapshots to stress tests (#6171) 2019-12-14 15:22:40 -08:00
db_stress_test_base.h db_stress: sometimes call CancelAllBackgroundWork() and Close() before closing DB (#6141) 2019-12-10 20:04:52 -08:00
db_stress_tool.cc db_stress: generate the key based on Zipfian distribution (hot key) (#6163) 2019-12-16 14:01:58 -08:00
no_batched_ops_stress.cc Add useful idioms to Random API (OneInOpt, PercentTrue) (#6154) 2019-12-13 14:30:14 -08:00