revision-id: 586dcc739902eebea973b570ca124d624efb5201 (fb-prod201903-276-g586dcc73990) parent(s): 3b3b49b00496de0807646583d47425b7718fcaa6 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2020-04-01 20:44:12 +0300 message: Add I_S.PERF_CONTEXT.LOCK_{ACQUIRE,RELEASE}_COUNT counters --- rocksdb | 2 +- storage/rocksdb/rdb_perf_context.cc | 8 +++++++- storage/rocksdb/rdb_perf_context.h | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/rocksdb b/rocksdb index 6b3b684f69a..08d7bf34ba7 160000 --- a/rocksdb +++ b/rocksdb @@ -1 +1 @@ -Subproject commit 6b3b684f69a5b6ad968f2270e54e92de1a42d468 +Subproject commit 08d7bf34ba792084073a668a22b63f162cc6c0f1 diff --git a/storage/rocksdb/rdb_perf_context.cc b/storage/rocksdb/rdb_perf_context.cc index 600f8b7cac5..43cda57ddf1 100644 --- a/storage/rocksdb/rdb_perf_context.cc +++ b/storage/rocksdb/rdb_perf_context.cc @@ -93,7 +93,10 @@ std::string rdb_pc_stat_types[] = { "IO_WRITE_NANOS", "IO_READ_NANOS", "IO_RANGE_SYNC_NANOS", - "IO_LOGGER_NANOS"}; + "IO_LOGGER_NANOS", + "LOCK_ACQUIRE_COUNT", + "LOCK_RELEASE_COUNT" + }; #define IO_PERF_RECORD(_field_) \ do { \ @@ -162,6 +165,9 @@ static void harvest_diffs(Rdb_atomic_perf_counters *const counters) { IO_PERF_RECORD(key_lock_wait_time); IO_PERF_RECORD(key_lock_wait_count); + IO_PERF_RECORD(lock_acquire_count); + IO_PERF_RECORD(lock_release_count); + IO_STAT_RECORD(thread_pool_id); IO_STAT_RECORD(bytes_written); IO_STAT_RECORD(bytes_read); diff --git a/storage/rocksdb/rdb_perf_context.h b/storage/rocksdb/rdb_perf_context.h index 37d7d8942df..f7511d08c3b 100644 --- a/storage/rocksdb/rdb_perf_context.h +++ b/storage/rocksdb/rdb_perf_context.h @@ -85,6 +85,8 @@ enum { PC_IO_READ_NANOS, PC_IO_RANGE_SYNC_NANOS, PC_IO_LOGGER_NANOS, + PC_LOCK_ACQUIRE_COUNT, + PC_LOCK_RELEASE_COUNT, PC_MAX_IDX };