Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time profile of sdk #642

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Time profile of sdk #642

wants to merge 4 commits into from

Conversation

dNechita
Copy link
Collaborator

No description provided.

@dNechita dNechita requested a review from a team April 15, 2024 08:21
rbudai98
rbudai98 previously approved these changes Apr 15, 2024
auto total_profiled_time =
compute_xyz_elapsed_time + sensor_get_frame_elapsed_time;

std::cout << "CameraItof::requestFrame() took: "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use std cout and not LOG(INFO) from glog?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main reason was to easily align the lines being printed. For example:

CameraItof::requestFrame() took: 80011us
|--> DepthSensorInterface::getFrame() took: 49724us(62.1465%)
|--> Algorithms::computeXYZ() took: 29566us(36.9524%)
Total profiled time: 79290us(99.0989%)

Another reason is that this way it's easier/clearer to separate the application usual logging from the printing of the time profiling. When one activates time profiling the most important thing to spot are the time measurements.
Also GLOG prints this header at the beginning of each line which is much noise in this situation.

@dNechita dNechita force-pushed the time-profile-of-sdk branch from 2d053fb to 97d8530 Compare April 18, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants