"lib/bindings/python/vscode:/vscode.git/clone" did not exist on "ffe206297d73d1ae7eba5b524b1d6b95f17fa633"
Unverified Commit 373b8ffb authored by Yongming Ding's avatar Yongming Ding Committed by GitHub
Browse files

feat(mocker): enable KV cache trace for decode workers (#6207)


Signed-off-by: default avatarYongming Ding <yongmingd@nvidia.com>
parent 5ff88b33
......@@ -119,10 +119,6 @@ impl KvManager {
return;
}
let Some(ref sink) = self.kv_event_sink else {
return;
};
if *KV_CACHE_TRACE_ENABLED {
let timestamp_ms = SystemTime::now()
.duration_since(UNIX_EPOCH)
......@@ -149,6 +145,10 @@ impl KvManager {
);
}
let Some(ref sink) = self.kv_event_sink else {
return;
};
let event_data = if is_store {
let num_blocks = full_blocks.len();
let local_hashes_slice = &local_hashes[local_hashes
......@@ -236,9 +236,8 @@ impl KvManager {
// Now insert the new block in active blocks with reference count 1
self.active_blocks.insert(hash.clone(), 1);
if self.kv_event_sink.is_some()
&& let UniqueBlock::FullBlock(stored_full_block) = hash
{
// Track blocks for trace/event
if let UniqueBlock::FullBlock(stored_full_block) = hash {
blocks_stored.push(*stored_full_block);
}
}
......@@ -259,9 +258,7 @@ impl KvManager {
self.active_blocks.remove(hash).unwrap();
// Track blocks for batch sending
if self.kv_event_sink.is_some()
&& let UniqueBlock::FullBlock(destroyed_full_block) = hash
{
if let UniqueBlock::FullBlock(destroyed_full_block) = hash {
blocks_destroyed.push(*destroyed_full_block);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment