1
0
mirror of https://github.com/facebook/rocksdb.git synced 2026-10-23 08:09:02 +03:00

Add blob_cache_read_byte perf context counter (#14792)

Summary:
Added blob_cache_read_byte in the rocksdb::PerContextBase to expose the blob cache read bytes when blob cache is enabled.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/14792

Reviewed By: xingbowang

Differential Revision: D106528572

Pulled By: mikechuangmeta

fbshipit-source-id: 555b2f01785bb819e62ed834ee45f0436dfb2875
This commit is contained in:
Michael Huang
2026-05-28 17:46:45 -07:00
committed by meta-codesync[bot]
parent 638354e766
commit 9270dc8149
9 changed files with 38 additions and 1 deletions

View File

@@ -348,6 +348,18 @@ jlong Java_org_rocksdb_PerfContext_getBlobCacheHitCount(JNIEnv*, jobject,
return perf_context->blob_cache_hit_count;
}
/*
* Class: org_rocksdb_PerfContext
* Method: getBlobCacheReadByte
* Signature: (J)J
*/
jlong Java_org_rocksdb_PerfContext_getBlobCacheReadByte(JNIEnv*, jobject,
jlong jpc_handle) {
ROCKSDB_NAMESPACE::PerfContext* perf_context =
reinterpret_cast<ROCKSDB_NAMESPACE::PerfContext*>(jpc_handle);
return perf_context->blob_cache_read_byte;
}
/*
* Class: org_rocksdb_PerfContext
* Method: getBlobReadCount

View File

@@ -184,6 +184,13 @@ public class PerfContext extends RocksObject {
return getBlobCacheHitCount(nativeHandle_);
}
/**
* @return total number of bytes read from blob cache
*/
public long getBlobCacheReadByte() {
return getBlobCacheReadByte(nativeHandle_);
}
/**
* @return total number of blob reads (with IO)
*/
@@ -693,6 +700,7 @@ public class PerfContext extends RocksObject {
private native long getMultigetReadBytes(final long handle);
private native long getIterReadBytes(final long handle);
private native long getBlobCacheHitCount(final long handle);
private native long getBlobCacheReadByte(final long handle);
private native long getBlobReadCount(final long handle);
private native long getBlobReadByte(final long handle);
private native long getBlobReadTime(final long handle);