Maysam Yabandeh e9f91a5176 Add a fetch_add variation to AddDBStats
Summary:
AddDBStats is in two steps of load and store, which is more efficient than fetch_add. This is however not thread-safe. Currently we have to protect concurrent access to AddDBStats with a mutex which is less efficient that fetch_add.

This patch adds the option to do fetch_add when AddDBStats. The results for my 2pc benchmark on sysbench is:
- vanilla: 68618 tps
- removing mutex on AddDBStats (unsafe): 69767 tps
- fetch_add for all AddDBStats: 69200 tps
- fetch_add only for concurrently access AddDBStats (this patch): 69579 tps
Closes https://github.com/facebook/rocksdb/pull/2505

Differential Revision: D5330656

Pulled By: maysamyabandeh

fbshipit-source-id: af64d7bee135b0e86b4fac323a4f9d9113eaa383
2017-06-29 17:12:19 -07:00
..
2017-06-27 17:11:48 -07:00
2017-06-27 17:11:48 -07:00
2017-06-29 15:26:52 -07:00
2017-06-05 11:27:34 -07:00
2017-06-27 17:11:48 -07:00
2017-06-27 17:11:48 -07:00
2017-06-27 17:11:48 -07:00
2017-06-27 17:11:48 -07:00
2017-06-26 16:56:24 -07:00
2017-06-13 16:58:01 -07:00
2017-06-28 13:13:22 -07:00
2017-06-27 17:11:48 -07:00
2017-06-24 14:11:29 -07:00
2017-06-28 15:42:27 -07:00
2017-04-27 18:06:12 -07:00
2017-06-26 16:56:24 -07:00
2017-06-26 16:56:24 -07:00
2017-06-26 16:56:24 -07:00
2017-06-26 16:56:24 -07:00
2017-06-27 17:11:48 -07:00
2017-06-28 15:42:27 -07:00
2017-06-05 11:27:34 -07:00
2017-06-27 17:11:48 -07:00
2017-06-27 17:11:48 -07:00
2017-06-26 16:56:24 -07:00
2017-06-27 17:11:48 -07:00