Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
59fe46c0
Commit
59fe46c0
authored
7 years ago
by
Victor Kotlyar
Browse files
Options
Downloads
Patches
Plain Diff
Fix logging of the transferTime, totalTime and transferSpeeds for the DiskWrite
threads.
parent
189ee48f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tapeserver/castor/tape/tapeserver/daemon/DiskStats.hpp
+9
-1
9 additions, 1 deletion
tapeserver/castor/tape/tapeserver/daemon/DiskStats.hpp
tapeserver/castor/tape/tapeserver/daemon/DiskWriteTask.cpp
+7
-6
7 additions, 6 deletions
tapeserver/castor/tape/tapeserver/daemon/DiskWriteTask.cpp
with
16 additions
and
7 deletions
tapeserver/castor/tape/tapeserver/daemon/DiskStats.hpp
+
9
−
1
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 */
...
...
This diff is collapsed.
Click to expand it.
tapeserver/castor/tape/tapeserver/daemon/DiskWriteTask.cpp
+
7
−
6
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
);
}
}}}}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment