Haobo Xu d9dd2a1926 [RocksDB] Expose thread local perf counter for low overhead, per call level performance statistics.
Summary:
As title. No locking/atomic is needed due to thread local. There is also no need to modify the existing client interface, in order to expose related counters.

perf_context_test shows a simple example of retrieving the number of user key comparison done for each put and get call. More counters could be added later.

Sample output
./perf_context_test 1000000
==== Test PerfContextTest.KeyComparisonCount
Inserting 1000000 key/value pairs
...
total user key comparison get: 43446523
total user key comparison put: 8017877
max user key comparison get: 88939
avg user key comparison get:43

Basically, the current skiplist does well on average, but could perform poorly in extreme cases.

Test Plan: run perf_context_test <total number of entries to put/get>

Reviewers: dhruba

Differential Revision: https://reviews.facebook.net/D12225
2013-08-14 15:24:06 -07:00
..
2013-03-14 16:00:23 -07:00
2013-06-12 11:17:19 -07:00
2013-08-13 14:25:42 -07:00
2013-08-05 15:43:49 -07:00
2013-05-23 11:49:38 -07:00
2012-09-16 19:33:43 -07:00
2013-08-13 14:04:56 -07:00
2012-12-17 11:26:59 -08:00
2012-12-17 11:26:59 -08:00
2013-02-28 18:04:58 -08:00
2013-08-13 14:25:42 -07:00
2013-08-13 14:25:42 -07:00
2013-08-13 14:25:42 -07:00
2013-08-13 14:25:42 -07:00
2013-08-13 14:25:42 -07:00
2013-07-31 12:42:23 -07:00
2013-02-28 18:04:58 -08:00
2013-08-13 14:25:42 -07:00