Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
Lima
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
35
Issues
35
List
Boards
Labels
Milestones
JIRA
JIRA
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LimaGroup
Lima
Commits
8c3c62eb
Commit
8c3c62eb
authored
Nov 08, 2019
by
Laurent Claustre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flush statistic log file
parent
989c4579
Pipeline
#16789
passed with stages
in 38 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
control/src/CtSaving.cpp
control/src/CtSaving.cpp
+16
-1
No files found.
control/src/CtSaving.cpp
View file @
8c3c62eb
...
...
@@ -2035,7 +2035,7 @@ CtConfig::ModuleTypeCallback* CtSaving::_getConfigHandler()
CtSaving
::
SaveContainer
::
SaveContainer
(
Stream
&
stream
)
:
m_stream
(
stream
),
m_statistic_size
(
16
),
m_max_writing_task
(
1
),
m_running_writing_task
(
0
),
m_log_stat_enable
(
false
)
m_log_stat_enable
(
false
)
,
m_log_stat_file
(
NULL
)
{
DEB_CONSTRUCTOR
();
}
...
...
@@ -2185,6 +2185,12 @@ void CtSaving::SaveContainer::writeFileStat(Data& aData, Timestamp start, Timest
void
CtSaving
::
SaveContainer
::
setEnableLogStat
(
bool
enable
)
{
// TODO: check that no current saving is active
AutoMutex
aLock
=
AutoMutex
(
m_cond
.
mutex
());
if
(
m_log_stat_enable
&&
!
enable
)
{
fclose
(
m_log_stat_file
);
m_log_stat_file
=
NULL
;
}
m_log_stat_enable
=
enable
;
}
...
...
@@ -2204,6 +2210,10 @@ void CtSaving::SaveContainer::prepareLogStat(const CtSaving::Parameters& pars)
if
(
m_log_stat_directory
.
empty
())
{
m_log_stat_directory
=
pars
.
directory
;
}
else
{
// check if directory changed, then update
if
(
m_log_stat_directory
!=
pars
.
directory
)
m_log_stat_directory
=
pars
.
directory
;
else
m_stream
.
checkDirectoryAccess
(
m_log_stat_directory
);
}
...
...
@@ -2657,6 +2667,11 @@ void CtSaving::SaveContainer::close(const CtSaving::Parameters* params,
}
}
}
// flush log file each time a frame file is closed
aLock
.
unlock
();
if
(
m_log_stat_enable
)
fflush
(
m_log_stat_file
);
}
void
CtSaving
::
SaveContainer
::
_setBuffer
(
int
frameNumber
,
ZBufferType
*
buffers
)
...
...
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