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
2df5d183
Commit
2df5d183
authored
5 months ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
[skip ci] better profiling print
parent
91314ead
No related branches found
No related tags found
1 merge request
!448
Draft: Resolve "Implementation of new nodes creation"
Pipeline
#20337
skipped
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_base.cpp
+26
-7
26 additions, 7 deletions
src/processor/processor_base.cpp
with
26 additions
and
7 deletions
src/processor/processor_base.cpp
+
26
−
7
View file @
2df5d183
...
@@ -240,19 +240,38 @@ bool ProcessorBase::check(CheckLog& _log, bool _verbose, std::ostream& _stream,
...
@@ -240,19 +240,38 @@ bool ProcessorBase::check(CheckLog& _log, bool _verbose, std::ostream& _stream,
void
ProcessorBase
::
printProfiling
(
std
::
ostream
&
_stream
)
const
void
ProcessorBase
::
printProfiling
(
std
::
ostream
&
_stream
)
const
{
{
unsigned
int
kf_average_period
=
(
n_kf_callback_
>
0
)
?
std
::
round
(
100
*
capture_period_mean_
*
n_capture_callback_
/
n_kf_callback_
)
:
0
;
unsigned
int
average_proc_cap_percent
=
(
n_capture_callback_
>
0
)
?
std
::
round
(
100
*
acc_duration_capture_
.
count
()
/
n_capture_callback_
/
capture_period_mean_
)
:
0
;
unsigned
int
max_proc_cap_percent
=
(
n_capture_callback_
>
0
)
?
std
::
round
(
100
*
max_duration_capture_
.
count
()
/
capture_period_min_
)
:
0
;
unsigned
int
average_proc_kf_percent
=
(
n_kf_callback_
>
0
)
?
std
::
round
(
100
*
acc_duration_kf_
.
count
()
/
n_kf_callback_
/
kf_average_period
)
:
0
;
unsigned
int
max_proc_kf_percent
=
(
n_kf_callback_
>
0
)
?
std
::
round
(
100
*
max_duration_kf_
.
count
()
/
kf_average_period
)
:
0
;
_stream
<<
"
\n
"
_stream
<<
"
\n
"
<<
getType
()
<<
" - "
<<
getName
()
<<
":"
<<
getType
()
<<
" - "
<<
getName
()
<<
":"
<<
"
\n\t
total time: "
<<
1e-6
*
(
acc_duration_capture_
+
acc_duration_kf_
).
count
()
<<
" s"
<<
"
\n\t
total
proc.
time: "
<<
1e-6
*
(
acc_duration_capture_
+
acc_duration_kf_
).
count
()
<<
" s"
<<
"
\n\t
Processing captures:"
<<
"
\n\t
Processing captures:"
<<
"
\n\t\t
total time: "
<<
1e-6
*
acc_duration_capture_
.
count
()
<<
" s"
<<
"
\n\t\t
captures processed: "
<<
n_capture_callback_
<<
"
\n\t\t
captures processed: "
<<
n_capture_callback_
<<
"
\n\t\t
average time: "
<<
1e-3
*
acc_duration_capture_
.
count
()
/
n_capture_callback_
<<
" ms"
<<
"
\n\t\t
average period: "
<<
1e-3
*
capture_period_mean_
<<
" ms"
<<
"
\n\t\t
max time: "
<<
1e-3
*
max_duration_capture_
.
count
()
<<
" ms"
<<
"
\n\t\t
total proc. time: "
<<
1e-6
*
acc_duration_capture_
.
count
()
<<
" s"
<<
"
\n\t\t
average proc. time: "
<<
1e-3
*
acc_duration_capture_
.
count
()
/
n_capture_callback_
<<
" ms"
<<
" ("
<<
average_proc_cap_percent
<<
"%)"
<<
"
\n\t\t
max proc. time: "
<<
1e-3
*
max_duration_capture_
.
count
()
<<
" ms"
<<
" ("
<<
max_proc_cap_percent
<<
"%)"
<<
"
\n\t
Processing keyframes:"
<<
"
\n\t
Processing keyframes:"
<<
"
\n\t\t
total time: "
<<
1e-6
*
acc_duration_kf_
.
count
()
<<
" s"
<<
"
\n\t\t
kf processed: "
<<
n_kf_callback_
<<
"
\n\t\t
kf processed: "
<<
n_kf_callback_
<<
"
\n\t\t
average time: "
<<
1e-3
*
acc_duration_kf_
.
count
()
/
n_kf_callback_
<<
" ms"
<<
"
\n\t\t
average period: "
<<
1e-3
*
kf_average_period
<<
" ms"
<<
"
\n\t\t
max time: "
<<
1e-3
*
max_duration_kf_
.
count
()
<<
" ms"
<<
std
::
endl
;
<<
"
\n\t\t
total proc. time: "
<<
1e-6
*
acc_duration_kf_
.
count
()
<<
" s"
<<
"
\n\t\t
average proc. time: "
<<
1e-3
*
acc_duration_kf_
.
count
()
/
n_kf_callback_
<<
" ms"
<<
" ("
<<
average_proc_kf_percent
<<
"%)"
<<
"
\n\t\t
max proc. time: "
<<
1e-3
*
max_duration_kf_
.
count
()
<<
" ms"
<<
" ("
<<
max_proc_kf_percent
<<
"%)"
<<
std
::
endl
;
}
}
bool
ProcessorBase
::
checkTimeTolerance
(
const
TimeStamp
&
_ts1
,
const
TimeStamp
&
_ts2
)
const
bool
ProcessorBase
::
checkTimeTolerance
(
const
TimeStamp
&
_ts1
,
const
TimeStamp
&
_ts2
)
const
...
...
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