mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 14:33:34 +08:00
dataman: add perf_counter
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user