Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
b581f272
Commit
b581f272
authored
Jun 18, 2013
by
Roman Donchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made perf tests record module name, selected implementation and number of threads.
parent
936236e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
ts_perf.hpp
modules/ts/include/opencv2/ts/ts_perf.hpp
+6
-3
ts_perf.cpp
modules/ts/src/ts_perf.cpp
+5
-0
No files found.
modules/ts/include/opencv2/ts/ts_perf.hpp
View file @
b581f272
...
@@ -260,6 +260,7 @@ public:
...
@@ -260,6 +260,7 @@ public:
static
void
Init
(
int
argc
,
const
char
*
const
argv
[]);
static
void
Init
(
int
argc
,
const
char
*
const
argv
[]);
static
void
Init
(
const
std
::
vector
<
std
::
string
>
&
availableImpls
,
static
void
Init
(
const
std
::
vector
<
std
::
string
>
&
availableImpls
,
int
argc
,
const
char
*
const
argv
[]);
int
argc
,
const
char
*
const
argv
[]);
static
void
RecordRunParameters
();
static
std
::
string
getDataPath
(
const
std
::
string
&
relativePath
);
static
std
::
string
getDataPath
(
const
std
::
string
&
relativePath
);
static
std
::
string
getSelectedImpl
();
static
std
::
string
getSelectedImpl
();
...
@@ -477,20 +478,22 @@ CV_EXPORTS void PrintTo(const Size& sz, ::std::ostream* os);
...
@@ -477,20 +478,22 @@ CV_EXPORTS void PrintTo(const Size& sz, ::std::ostream* os);
#define CV_PERF_UNWRAP_IMPLS(...) __VA_ARGS__
#define CV_PERF_UNWRAP_IMPLS(...) __VA_ARGS__
// "plain" should always be one of the implementations
// "plain" should always be one of the implementations
#define CV_PERF_TEST_MAIN_WITH_IMPLS(
testsuit
name, impls, ...) \
#define CV_PERF_TEST_MAIN_WITH_IMPLS(
module
name, impls, ...) \
int main(int argc, char **argv)\
int main(int argc, char **argv)\
{\
{\
while (++argc >= (--argc,-1)) {__VA_ARGS__; break;}
/*this ugly construction is needed for VS 2005*/
\
while (++argc >= (--argc,-1)) {__VA_ARGS__; break;}
/*this ugly construction is needed for VS 2005*/
\
std::string impls_[] = { CV_PERF_UNWRAP_IMPLS impls };\
std::string impls_[] = { CV_PERF_UNWRAP_IMPLS impls };\
::perf::Regression::Init(#
testsuit
name);\
::perf::Regression::Init(#
module
name);\
::perf::TestBase::Init(std::vector<std::string>(impls_, impls_ + sizeof impls_ / sizeof *impls_),\
::perf::TestBase::Init(std::vector<std::string>(impls_, impls_ + sizeof impls_ / sizeof *impls_),\
argc, argv);\
argc, argv);\
::testing::InitGoogleTest(&argc, argv);\
::testing::InitGoogleTest(&argc, argv);\
cvtest::printVersionInfo();\
cvtest::printVersionInfo();\
::testing::Test::RecordProperty("cv_module_name", #modulename);\
::perf::TestBase::RecordRunParameters();\
return RUN_ALL_TESTS();\
return RUN_ALL_TESTS();\
}
}
#define CV_PERF_TEST_MAIN(
testsuitname, ...) CV_PERF_TEST_MAIN_WITH_IMPLS(testsuit
name, ("plain"), __VA_ARGS__)
#define CV_PERF_TEST_MAIN(
modulename, ...) CV_PERF_TEST_MAIN_WITH_IMPLS(module
name, ("plain"), __VA_ARGS__)
#define TEST_CYCLE_N(n) for(declare.iterations(n); startTimer(), next(); stopTimer())
#define TEST_CYCLE_N(n) for(declare.iterations(n); startTimer(), next(); stopTimer())
#define TEST_CYCLE() for(; startTimer(), next(); stopTimer())
#define TEST_CYCLE() for(; startTimer(), next(); stopTimer())
...
...
modules/ts/src/ts_perf.cpp
View file @
b581f272
...
@@ -734,6 +734,11 @@ void TestBase::Init(const std::vector<std::string> & availableImpls,
...
@@ -734,6 +734,11 @@ void TestBase::Init(const std::vector<std::string> & availableImpls,
_timeadjustment
=
_calibrate
();
_timeadjustment
=
_calibrate
();
}
}
void
TestBase
::
RecordRunParameters
()
{
::
testing
::
Test
::
RecordProperty
(
"cv_implementation"
,
param_impl
);
::
testing
::
Test
::
RecordProperty
(
"cv_num_threads"
,
param_threads
);
}
std
::
string
TestBase
::
getSelectedImpl
()
std
::
string
TestBase
::
getSelectedImpl
()
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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