Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
59fe46c0
Commit
59fe46c0
authored
Jul 14, 2017
by
Victor Kotlyar
Browse files
Fix logging of the transferTime, totalTime and transferSpeeds for the DiskWrite
threads.
parent
189ee48f
Changes
2
Hide whitespace changes
Inline
Side-by-side
tapeserver/castor/tape/tapeserver/daemon/DiskStats.hpp
View file @
59fe46c0
...
...
@@ -71,6 +71,12 @@ namespace daemon {
/** Count of files actually transfered in the session. */
uint64_t
filesCount
;
/** Archive file ID of the current file */
uint64_t
fileId
;
/** Destination URL for the current file */
std
::
string
dstURL
;
/** Constructor: all defaults are zero */
DiskStats
()
:
openingTime
(
0.0
),
closingTime
(
0.0
),
...
...
@@ -84,7 +90,9 @@ namespace daemon {
transferTime
(
0.0
),
totalTime
(
0.0
),
dataVolume
(
0
),
filesCount
(
0
)
{}
filesCount
(
0
),
fileId
(
0
),
dstURL
(
""
)
{}
/** Accumulate contents of another stats block */
...
...
tapeserver/castor/tape/tapeserver/daemon/DiskWriteTask.cpp
View file @
59fe46c0
...
...
@@ -55,6 +55,8 @@ bool DiskWriteTask::execute(RecallReportPacker& reporter,cta::log::LogContext&
URLcontext
.
add
(
"fileId"
,
m_retrieveJob
->
retrieveRequest
.
archiveFileID
)
.
add
(
"dstURL"
,
m_retrieveJob
->
retrieveRequest
.
dstURL
)
.
add
(
"fSeq"
,
m_retrieveJob
->
selectedTapeFile
().
fSeq
);
m_stats
.
dstURL
=
m_retrieveJob
->
retrieveRequest
.
dstURL
;
m_stats
.
fileId
=
m_retrieveJob
->
retrieveRequest
.
archiveFileID
;
// This out-of-try-catch variables allows us to record the stage of the
// process we're in, and to count the error if it occurs.
// We will not record errors for an empty string. This will allow us to
...
...
@@ -125,10 +127,6 @@ bool DiskWriteTask::execute(RecallReportPacker& reporter,cta::log::LogContext&
currentErrorToCount
=
""
;
}
}
//end of while(1)
logWithStat
(
cta
::
log
::
INFO
,
"File successfully transfered to disk"
,
lc
);
watchdog
.
deleteParameter
(
"stillOpenFileForThread"
+
std
::
to_string
((
long
long
)
threadID
));
m_retrieveJob
->
transferredSize
=
m_stats
.
dataVolume
;
m_retrieveJob
->
transferredChecksumType
=
"ADLER32"
;
{
...
...
@@ -140,6 +138,9 @@ bool DiskWriteTask::execute(RecallReportPacker& reporter,cta::log::LogContext&
m_stats
.
waitReportingTime
+=
localTime
.
secs
(
cta
::
utils
::
Timer
::
resetCounter
);
m_stats
.
transferTime
=
transferTime
.
secs
();
m_stats
.
totalTime
=
totalTime
.
secs
();
logWithStat
(
cta
::
log
::
INFO
,
"File successfully transfered to disk"
,
lc
);
watchdog
.
deleteParameter
(
"stillOpenFileForThread"
+
std
::
to_string
((
long
long
)
threadID
));
//everything went well, return true
return
true
;
...
...
@@ -270,8 +271,8 @@ void DiskWriteTask::logWithStat(int level,const std::string& msg,cta::log::LogCo
m_stats
.
transferTime
?
1.0
*
m_stats
.
dataVolume
/
1000
/
1000
/
m_stats
.
transferTime
:
0
)
.
add
(
"openRWCloseToTransferTimeRatio"
,
m_stats
.
transferTime
?
(
m_stats
.
openingTime
+
m_stats
.
readWriteTime
+
m_stats
.
closingTime
)
/
m_stats
.
transferTime
:
0.0
)
.
add
(
"fileId"
,
m_
retrieveJob
->
retrieveRequest
.
archiveF
ileI
D
)
.
add
(
"dstURL"
,
m_
retrieveJob
->
retrieveRequest
.
dstURL
);
.
add
(
"fileId"
,
m_
stats
.
f
ileI
d
)
.
add
(
"dstURL"
,
m_
stats
.
dstURL
);
lc
.
log
(
level
,
msg
);
}
}}}}
...
...
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