-
Notifications
You must be signed in to change notification settings - Fork 27
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
base: main
Are you sure you want to change the base?
Time profile of sdk #642
Conversation
Signed-off-by: Dan Nechita <[email protected]>
Signed-off-by: Dan Nechita <[email protected]>
Signed-off-by: Dan Nechita <[email protected]>
auto total_profiled_time = | ||
compute_xyz_elapsed_time + sensor_get_frame_elapsed_time; | ||
|
||
std::cout << "CameraItof::requestFrame() took: " |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Signed-off-by: Dan Nechita <[email protected]>
2d053fb
to
97d8530
Compare
No description provided.