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
38c0278b
Commit
38c0278b
authored
5 years ago
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ts: silence zero memory usage messages
parent
ffd4a279
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
ts.cpp
modules/ts/src/ts.cpp
+12
-3
No files found.
modules/ts/src/ts.cpp
View file @
38c0278b
...
...
@@ -790,7 +790,10 @@ void testTearDown()
{
size_t
peak
=
malloc_peak
();
memory_usage
=
peak
-
memory_usage_base
;
CV_LOG_INFO
(
NULL
,
"Memory_usage (malloc): "
<<
memory_usage
<<
" (base="
<<
memory_usage_base
<<
")"
);
if
(
peak
>
0
)
{
CV_LOG_INFO
(
NULL
,
"Memory_usage (malloc): "
<<
memory_usage
<<
" (base="
<<
memory_usage_base
<<
")"
);
}
}
{
// core/src/alloc.cpp: #define OPENCV_ALLOC_ENABLE_STATISTICS
...
...
@@ -799,7 +802,10 @@ void testTearDown()
cv
::
utils
::
AllocatorStatisticsInterface
&
ocv_stats
=
cv
::
getAllocatorStatistics
();
ocv_peak
=
ocv_stats
.
getPeakUsage
();
ocv_memory_usage
=
ocv_peak
-
memory_usage_base_opencv
;
CV_LOG_INFO
(
NULL
,
"Memory_usage (OpenCV): "
<<
ocv_memory_usage
<<
" (base="
<<
memory_usage_base_opencv
<<
" current="
<<
ocv_stats
.
getCurrentUsage
()
<<
")"
);
if
(
ocv_peak
)
{
CV_LOG_INFO
(
NULL
,
"Memory_usage (OpenCV): "
<<
ocv_memory_usage
<<
" (base="
<<
memory_usage_base_opencv
<<
" current="
<<
ocv_stats
.
getCurrentUsage
()
<<
")"
);
}
if
(
memory_usage
==
0
)
// external profiler has higher priority (and accuracy)
memory_usage
=
ocv_memory_usage
;
}
...
...
@@ -809,7 +815,10 @@ void testTearDown()
cv
::
utils
::
AllocatorStatisticsInterface
&
ocl_stats
=
cv
::
ocl
::
getOpenCLAllocatorStatistics
();
ocl_peak
=
ocl_stats
.
getPeakUsage
();
ocl_memory_usage
=
ocl_peak
-
memory_usage_base_opencl
;
CV_LOG_INFO
(
NULL
,
"Memory_usage (OpenCL): "
<<
ocl_memory_usage
<<
" (base="
<<
memory_usage_base_opencl
<<
" current="
<<
ocl_stats
.
getCurrentUsage
()
<<
")"
);
if
(
ocl_memory_usage
>
0
)
{
CV_LOG_INFO
(
NULL
,
"Memory_usage (OpenCL): "
<<
ocl_memory_usage
<<
" (base="
<<
memory_usage_base_opencl
<<
" current="
<<
ocl_stats
.
getCurrentUsage
()
<<
")"
);
}
::
testing
::
Test
::
RecordProperty
(
"ocl_memory_usage"
,
cv
::
format
(
"%llu"
,
(
unsigned
long
long
)
ocl_memory_usage
));
}
...
...
This diff is collapsed.
Click to expand it.
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