Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-fcl
Commits
0213179c
Verified
Commit
0213179c
authored
Mar 30, 2021
by
Justin Carpentier
Browse files
test: fix duplicate namings
Ideally, we should merge the two timers
parent
a8785716
Pipeline
#13789
passed with stage
in 93 minutes and 5 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/benchmark.cpp
View file @
0213179c
...
...
@@ -99,7 +99,7 @@ double distance (const std::vector<Transform3f>& tf,
node
.
enable_statistics
=
verbose
;
Timer
timer
;
Bench
Timer
timer
;
timer
.
start
();
for
(
std
::
size_t
i
=
0
;
i
<
tf
.
size
();
++
i
)
{
...
...
@@ -125,7 +125,7 @@ double collide (const std::vector<Transform3f>& tf,
node
.
enable_statistics
=
verbose
;
Timer
timer
;
Bench
Timer
timer
;
timer
.
start
();
for
(
std
::
size_t
i
=
0
;
i
<
tf
.
size
();
++
i
)
{
...
...
test/profiling.cpp
View file @
0213179c
...
...
@@ -96,7 +96,7 @@ void collide(const std::vector<Transform3f>& tf,
Results
&
results
)
{
Transform3f
Id
;
Timer
timer
;
Bench
Timer
timer
;
for
(
std
::
size_t
i
=
0
;
i
<
tf
.
size
();
++
i
)
{
timer
.
start
();
/* int num_contact = */
...
...
test/utility.cpp
View file @
0213179c
...
...
@@ -11,7 +11,7 @@ namespace hpp
namespace
fcl
{
Timer
::
Timer
()
Bench
Timer
::
Bench
Timer
()
{
#ifdef _WIN32
QueryPerformanceFrequency
(
&
frequency
);
...
...
@@ -28,12 +28,12 @@ Timer::Timer()
}
Timer
::~
Timer
()
Bench
Timer
::~
Bench
Timer
()
{
}
void
Timer
::
start
()
void
Bench
Timer
::
start
()
{
stopped
=
0
;
// reset stop flag
#ifdef _WIN32
...
...
@@ -44,7 +44,7 @@ void Timer::start()
}
void
Timer
::
stop
()
void
Bench
Timer
::
stop
()
{
stopped
=
1
;
// set timer stopped flag
...
...
@@ -56,7 +56,7 @@ void Timer::stop()
}
double
Timer
::
getElapsedTimeInMicroSec
()
double
Bench
Timer
::
getElapsedTimeInMicroSec
()
{
#ifdef _WIN32
if
(
!
stopped
)
...
...
@@ -76,19 +76,19 @@ double Timer::getElapsedTimeInMicroSec()
}
double
Timer
::
getElapsedTimeInMilliSec
()
double
Bench
Timer
::
getElapsedTimeInMilliSec
()
{
return
this
->
getElapsedTimeInMicroSec
()
*
0.001
;
}
double
Timer
::
getElapsedTimeInSec
()
double
Bench
Timer
::
getElapsedTimeInSec
()
{
return
this
->
getElapsedTimeInMicroSec
()
*
0.000001
;
}
double
Timer
::
getElapsedTime
()
double
Bench
Timer
::
getElapsedTime
()
{
return
this
->
getElapsedTimeInMilliSec
();
}
...
...
test/utility.h
View file @
0213179c
...
...
@@ -70,11 +70,11 @@ namespace fcl
typedef
shared_ptr
<
octomap
::
OcTree
>
OcTreePtr_t
;
#endif
class
Timer
class
Bench
Timer
{
public:
Timer
();
~
Timer
();
Bench
Timer
();
~
Bench
Timer
();
void
start
();
///< start timer
void
stop
();
///< stop the timer
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment