dataman: add perf_counter

This commit is contained in:
Igor Mišić 2023-05-12 16:01:31 +02:00 committed by Beat Küng
parent c40a38bd88
commit 57f11c8149
1 changed files with 5 additions and 0 deletions

View File

@ -711,8 +711,10 @@ task_main(int argc, char *argv[])
case DM_WRITE:
g_func_counts[DM_WRITE]++;
perf_begin(_dm_write_perf);
result = g_dm_ops->write(static_cast<dm_item_t>(request.item), request.index,
&(request.data), request.data_length);
perf_end(_dm_write_perf);
if (result > 0) {
response.status = dataman_response_s::STATUS_SUCCESS;
@ -726,9 +728,12 @@ task_main(int argc, char *argv[])
case DM_READ:
g_func_counts[DM_READ]++;
perf_begin(_dm_read_perf);
result = g_dm_ops->read(static_cast<dm_item_t>(request.item), request.index,
&(response.data), request.data_length);
perf_end(_dm_read_perf);
if (result > 0) {
response.status = dataman_response_s::STATUS_SUCCESS;