Skip to content

Commit 7a3e211

Browse files
committed
ftds for cache dump
1 parent 7ccbb34 commit 7a3e211

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ucm/store/cache/cc/dump_queue.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ void DumpQueue::DispatchOneTask(Trans::Stream* stream, size_t tensorSize, TaskPa
9393

9494
Status DumpQueue::DumpOneTask(Trans::Stream* stream, size_t tensorSize, TaskPtr task)
9595
{
96+
auto tp = NowTime::Now();
9697
Detail::TaskDesc backendTaskDesc;
9798
backendTaskDesc.brief = "Cache2Backend";
9899
const auto nShard = task->desc.size();
@@ -117,12 +118,14 @@ Status DumpQueue::DumpOneTask(Trans::Stream* stream, size_t tensorSize, TaskPtr
117118
Detail::Shard{shard.owner, shard.index, {shardTask.bufferHandle.Data()}});
118119
backendTaskIndex.emplace_back(i);
119120
}
121+
auto tpMakeBuffer = NowTime::Now();
120122
if (backendTaskIndex.empty()) { return Status::OK(); }
121123
auto s = stream->Synchronized();
122124
if (s.Failure()) [[unlikely]] {
123125
UC_ERROR("Failed({}) to sync on stream.", s);
124126
return s;
125127
}
128+
auto tpSyncStream = NowTime::Now();
126129
for (const auto& i : backendTaskIndex) { shardTasks[i].bufferHandle.MarkReady(); }
127130
auto res = backend_->Dump(std::move(backendTaskDesc));
128131
if (!res) [[unlikely]] {
@@ -134,6 +137,9 @@ Status DumpQueue::DumpOneTask(Trans::Stream* stream, size_t tensorSize, TaskPtr
134137
shardTask.backendTaskHandle = res.Value();
135138
dumping_.Push(std::move(shardTask));
136139
}
140+
auto tpEnd = NowTime::Now();
141+
UC_DEBUG("Cache task({}) mk_buf={:06f}s, sync={:06f}s, back={:06f}s.", task->id,
142+
tpMakeBuffer - tp, tpSyncStream - tpMakeBuffer, tpEnd - tpSyncStream);
137143
return Status::OK();
138144
}
139145

0 commit comments

Comments
 (0)