Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
cc4ae0bb
Commit
cc4ae0bb
authored
5 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Add profiling for keyFrame & capture callbacks
parent
f3c3b10e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4876
passed
5 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+4
-0
4 additions, 0 deletions
CMakeLists.txt
src/problem/problem.cpp
+16
-0
16 additions, 0 deletions
src/problem/problem.cpp
src/sensor/sensor_base.cpp
+15
-0
15 additions, 0 deletions
src/sensor/sensor_base.cpp
with
35 additions
and
0 deletions
CMakeLists.txt
+
4
−
0
View file @
cc4ae0bb
...
...
@@ -76,6 +76,10 @@ IF(NOT BUILD_DOC)
OPTION
(
BUILD_DOC
"Build Documentation"
OFF
)
ENDIF
(
NOT BUILD_DOC
)
IF
(
PROFILING
)
add_definitions
(
-DPROFILING
)
message
(
"Compiling with profiling options..."
)
ENDIF
(
PROFILING
)
#############
## Testing ##
#############
...
...
This diff is collapsed.
Click to expand it.
src/problem/problem.cpp
+
16
−
0
View file @
cc4ae0bb
...
...
@@ -464,7 +464,23 @@ void Problem::keyFrameCallback(FrameBasePtr _keyframe_ptr, ProcessorBasePtr _pro
for
(
auto
sensor
:
hardware_ptr_
->
getSensorList
())
for
(
auto
processor
:
sensor
->
getProcessorList
())
if
(
processor
&&
(
processor
!=
_processor_ptr
)
)
{
#ifdef PROFILING
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
#endif
processor
->
keyFrameCallback
(
_keyframe_ptr
,
_time_tolerance
);
#ifdef PROFILING
auto
stop
=
std
::
chrono
::
high_resolution_clock
::
now
();
auto
duration
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
microseconds
>
(
stop
-
start
);
WOLF_INFO
(
"keyFrameCallback Prc_id: "
,
processor
->
id
(),
" Prc_type: "
,
processor
->
getType
(),
" Prc_name: "
,
processor
->
getName
(),
" keyframe_id: "
,
_keyframe_ptr
->
id
(),
" keyframe_type: "
,
_keyframe_ptr
->
getType
(),
" timestamp: "
,
_keyframe_ptr
->
getTimeStamp
(),
" microseconds: "
,
duration
.
count
());
#endif
}
}
bool
Problem
::
permitAuxFrame
(
ProcessorBasePtr
_processor_ptr
)
const
...
...
This diff is collapsed.
Click to expand it.
src/sensor/sensor_base.cpp
+
15
−
0
View file @
cc4ae0bb
...
...
@@ -350,7 +350,22 @@ bool SensorBase::process(const CaptureBasePtr capture_ptr)
for
(
const
auto
processor
:
processor_list_
)
{
#ifdef PROFILING
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
#endif
processor
->
captureCallback
(
capture_ptr
);
#ifdef PROFILING
auto
stop
=
std
::
chrono
::
high_resolution_clock
::
now
();
auto
duration
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
microseconds
>
(
stop
-
start
);
WOLF_INFO
(
"captureCallback Prc_id: "
,
processor
->
id
(),
" Prc_type: "
,
processor
->
getType
(),
" Prc_name: "
,
processor
->
getName
(),
" Cptr_id: "
,
capture_ptr
->
id
(),
" Cptr_type: "
,
capture_ptr
->
getType
(),
" timestamp: "
,
capture_ptr
->
getTimeStamp
(),
" microseconds: "
,
duration
.
count
());
#endif
}
return
true
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment