db_bench: Better way to randomize repeated read keys in -read_random_exp_range
db_bench: Better way to randomize repeated read keys in -read_random_exp_range

Summary: Use a better way to map from a key with locality to a random location. Now with the same -read_random_exp_range setting, hit rate drops, which it is expected.

Test Plan: ./db_bench --benchmarks=readrandom -statistics -use_existing_db -cache_size=5000000 --read_random_exp_range=<multiple_values>

Reviewers: MarkCallaghan, kradhakrishnan, igor

Reviewed By: igor

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D34761

zhangpng/rocksdb,RyanTech/rocksdb,bbiao/rocksdb,OverlordQ/rocksdb,amyvmiwei/rocksdb,wlqGit/rocksdb,vmx/rocksdb,jalexanderqed/rocksdb,ryneli/rocksdb,alihalabyah/rocksdb,mbarbon/rocksdb,norton/rocksdb,lgscofield/rocksdb,wskplho/rocksdb,fengshao0907/rocksdb,JackLian/rocksdb,kaschaeffer/rocksdb,wskplho/rocksdb,dkorolev/rocksdb,JoeWoo/rocksdb,flabby/rocksdb,siddhartharay007/rocksdb,wenduo/rocksdb,anagav/rocksdb,sorphi/rocksdb,geraldoandradee/rocksdb,JohnPJenkins/rocksdb,norton/rocksdb,biddyweb/rocksdb,NickCis/rocksdb,amyvmiwei/rocksdb,ylong/rocksdb,NickCis/rocksdb,mbarbon/rocksdb,temicai/rocksdb,lgscofield/rocksdb,vashstorm/rocksdb,geraldoandradee/rocksdb,NickCis/rocksdb,hobinyoon/rocksdb,tsheasha/rocksdb,wlqGit/rocksdb,flabby/rocksdb,Andymic/rocksdb,wenduo/rocksdb,zhangpng/rocksdb,caijieming-baidu/rocksdb,wskplho/rocksdb,wenduo/rocksdb,JoeWoo/rocksdb,IMCG/RcoksDB,norton/rocksdb,skunkwerks/rocksdb,anagav/rocksdb,caijieming-baidu/rocksdb,tsheasha/rocksdb,flabby/rocksdb,tizzybec/rocksdb,facebook/rocksdb,biddyweb/rocksdb,ryneli/rocksdb,alihalabyah/rocksdb,virtdb/rocksdb,OverlordQ/rocksdb,wskplho/rocksdb,zhangpng/rocksdb,Vaisman/rocksdb,bbiao/rocksdb,flabby/rocksdb,alihalabyah/rocksdb,vashstorm/rocksdb,jalexanderqed/rocksdb,flabby/rocksdb,makelivedotnet/rocksdb,Andymic/rocksdb,norton/rocksdb,makelivedotnet/rocksdb,anagav/rocksdb,Andymic/rocksdb,virtdb/rocksdb,facebook/rocksdb,anagav/rocksdb,hobinyoon/rocksdb,vashstorm/rocksdb,geraldoandradee/rocksdb,tsheasha/rocksdb,mbarbon/rocksdb,biddyweb/rocksdb,wat-ze-hex/rocksdb,ryneli/rocksdb,alihalabyah/rocksdb,lgscofield/rocksdb,caijieming-baidu/rocksdb,RyanTech/rocksdb,jalexanderqed/rocksdb,fengshao0907/rocksdb,dkorolev/rocksdb,IMCG/RcoksDB,geraldoandradee/rocksdb,norton/rocksdb,Andymic/rocksdb,fengshao0907/rocksdb,dkorolev/rocksdb,Vaisman/rocksdb,Applied-Duality/rocksdb,RyanTech/rocksdb,hobinyoon/rocksdb,rDSN-Projects/rocksdb.replicated,bbiao/rocksdb,wlqGit/rocksdb,skunkwerks/rocksdb,rDSN-Projects/rocksdb.replicated,makelivedotnet/rocksdb,JoeWoo/rocksdb,JohnPJenkins/rocksdb,jalexanderqed/rocksdb,Applied-Duality/rocksdb,JoeWoo/rocksdb,SunguckLee/RocksDB,OverlordQ/rocksdb,Applied-Duality/rocksdb,skunkwerks/rocksdb,siddhartharay007/rocksdb,wat-ze-hex/rocksdb,JackLian/rocksdb,fengshao0907/rocksdb,temicai/rocksdb,temicai/rocksdb,Vaisman/rocksdb,tizzybec/rocksdb,dkorolev/rocksdb,RyanTech/rocksdb,flabby/rocksdb,biddyweb/rocksdb,skunkwerks/rocksdb,wat-ze-hex/rocksdb,tizzybec/rocksdb,vmx/rocksdb,wskplho/rocksdb,siddhartharay007/rocksdb,alihalabyah/rocksdb,sorphi/rocksdb,JackLian/rocksdb,JoeWoo/rocksdb,jalexanderqed/rocksdb,JackLian/rocksdb,SunguckLee/RocksDB,Applied-Duality/rocksdb,OverlordQ/rocksdb,biddyweb/rocksdb,kaschaeffer/rocksdb,siddhartharay007/rocksdb,wlqGit/rocksdb,hobinyoon/rocksdb,luckywhu/rocksdb,temicai/rocksdb,SunguckLee/RocksDB,anagav/rocksdb,jalexanderqed/rocksdb,vashstorm/rocksdb,Andymic/rocksdb,NickCis/rocksdb,ryneli/rocksdb,vmx/rocksdb,makelivedotnet/rocksdb,anagav/rocksdb,sorphi/rocksdb,skunkwerks/rocksdb,wat-ze-hex/rocksdb,norton/rocksdb,wenduo/rocksdb,ryneli/rocksdb,vmx/rocksdb,zhangpng/rocksdb,wskplho/rocksdb,Andymic/rocksdb,ylong/rocksdb,zhangpng/rocksdb,kaschaeffer/rocksdb,anagav/rocksdb,JackLian/rocksdb,ylong/rocksdb,caijieming-baidu/rocksdb,geraldoandradee/rocksdb,rDSN-Projects/rocksdb.replicated,flabby/rocksdb,temicai/rocksdb,wlqGit/rocksdb,wlqGit/rocksdb,bbiao/rocksdb,kaschaeffer/rocksdb,norton/rocksdb,Vaisman/rocksdb,NickCis/rocksdb,SunguckLee/RocksDB,amyvmiwei/rocksdb,SunguckLee/RocksDB,sorphi/rocksdb,fengshao0907/rocksdb,tizzybec/rocksdb,wenduo/rocksdb,siddhartharay007/rocksdb,wenduo/rocksdb,facebook/rocksdb,biddyweb/rocksdb,kaschaeffer/rocksdb,wenduo/rocksdb,skunkwerks/rocksdb,kaschaeffer/rocksdb,sorphi/rocksdb,IMCG/RcoksDB,norton/rocksdb,hobinyoon/rocksdb,tsheasha/rocksdb,biddyweb/rocksdb,tsheasha/rocksdb,tsheasha/rocksdb,geraldoandradee/rocksdb,IMCG/RcoksDB,facebook/rocksdb,vashstorm/rocksdb,amyvmiwei/rocksdb,IMCG/RcoksDB,Applied-Duality/rocksdb,virtdb/rocksdb,dkorolev/rocksdb,virtdb/rocksdb,amyvmiwei/rocksdb,alihalabyah/rocksdb,bbiao/rocksdb,Vaisman/rocksdb,RyanTech/rocksdb,wenduo/rocksdb,vmx/rocksdb,sorphi/rocksdb,luckywhu/rocksdb,JohnPJenkins/rocksdb,JoeWoo/rocksdb,skunkwerks/rocksdb,mbarbon/rocksdb,vmx/rocksdb,JoeWoo/rocksdb,caijieming-baidu/rocksdb,zhangpng/rocksdb,makelivedotnet/rocksdb,facebook/rocksdb,lgscofield/rocksdb,Andymic/rocksdb,dkorolev/rocksdb,caijieming-baidu/rocksdb,lgscofield/rocksdb,ylong/rocksdb,alihalabyah/rocksdb,luckywhu/rocksdb,OverlordQ/rocksdb,JackLian/rocksdb,luckywhu/rocksdb,bbiao/rocksdb,hobinyoon/rocksdb,Applied-Duality/rocksdb,bbiao/rocksdb,rDSN-Projects/rocksdb.replicated,amyvmiwei/rocksdb,hobinyoon/rocksdb,bbiao/rocksdb,caijieming-baidu/rocksdb,ryneli/rocksdb,SunguckLee/RocksDB,IMCG/RcoksDB,makelivedotnet/rocksdb,tizzybec/rocksdb,dkorolev/rocksdb,SunguckLee/RocksDB,luckywhu/rocksdb,JohnPJenkins/rocksdb,lgscofield/rocksdb,sorphi/rocksdb,Vaisman/rocksdb,siddhartharay007/rocksdb,ylong/rocksdb,Applied-Duality/rocksdb,mbarbon/rocksdb,rDSN-Projects/rocksdb.replicated,vmx/rocksdb,SunguckLee/RocksDB,vmx/rocksdb,RyanTech/rocksdb,wat-ze-hex/rocksdb,temicai/rocksdb,JohnPJenkins/rocksdb,wat-ze-hex/rocksdb,NickCis/rocksdb,rDSN-Projects/rocksdb.replicated,vashstorm/rocksdb,facebook/rocksdb,facebook/rocksdb,rDSN-Projects/rocksdb.replicated,wlqGit/rocksdb,wskplho/rocksdb,amyvmiwei/rocksdb,luckywhu/rocksdb,mbarbon/rocksdb,Andymic/rocksdb,kaschaeffer/rocksdb,Vaisman/rocksdb,facebook/rocksdb,virtdb/rocksdb,jalexanderqed/rocksdb,siddhartharay007/rocksdb,ylong/rocksdb,zhangpng/rocksdb,ylong/rocksdb,wat-ze-hex/rocksdb,ryneli/rocksdb,tizzybec/rocksdb,wat-ze-hex/rocksdb,virtdb/rocksdb,NickCis/rocksdb,makelivedotnet/rocksdb,geraldoandradee/rocksdb,virtdb/rocksdb,tsheasha/rocksdb,OverlordQ/rocksdb,luckywhu/rocksdb,hobinyoon/rocksdb,tsheasha/rocksdb,JohnPJenkins/rocksdb,tizzybec/rocksdb,fengshao0907/rocksdb,lgscofield/rocksdb,fengshao0907/rocksdb,temicai/rocksdb,JackLian/rocksdb,mbarbon/rocksdb,IMCG/RcoksDB,RyanTech/rocksdb,JohnPJenkins/rocksdb,OverlordQ/rocksdb,vashstorm/rocksdb