Commit dfee7f47 authored by Eric Cano's avatar Eric Cano
Browse files

Renamed the tape statistics parameter transferTime to readWriteTime, and created

a new composite transferTime (member function) which now matches better the previous definition of transfeTime.
parent 011872c2
......@@ -270,11 +270,12 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::logWithStat(
.add("mountTime", m_stats.mountTime)
.add("positionTime", m_stats.positionTime)
.add("waitInstructionsTime", m_stats.waitInstructionsTime)
.add("transferTime", m_stats.transferTime)
.add("readWriteTime", m_stats.readWriteTime)
.add("waitFreeMemoryTime", m_stats.waitFreeMemoryTime)
.add("waitReportingTime", m_stats.waitReportingTime)
.add("unloadTime", m_stats.unloadTime)
.add("unmountTime", m_stats.unmountTime)
.add("transferTime", m_stats.transferTime())
.add("totalTime", m_stats.totalTime)
.add("dataVolume", m_stats.dataVolume)
.add("headerVolume", m_stats.headerVolume)
......
......@@ -127,7 +127,7 @@ public:
// append() signaled the end of the file.
stillReading = false;
}
localStats.transferTime += timer.secs(castor::utils::Timer::resetCounter);
localStats.readWriteTime += timer.secs(castor::utils::Timer::resetCounter);
localStats.dataVolume += mb->m_payload.size();
// Pass the block to the disk write task
m_fifo.pushDataBlock(mb);
......@@ -144,9 +144,10 @@ public:
// We now transmitted one file:
localStats.filesCount++;
params.add("positionTime", localStats.positionTime)
.add("transferTime", localStats.transferTime)
.add("readWriteTime", localStats.readWriteTime)
.add("waitFreeMemoryTime",localStats.waitFreeMemoryTime)
.add("waitReportingTime",localStats.waitReportingTime)
.add("transferTime",localStats.transferTime())
.add("totalTime", localStats.totalTime)
.add("dataVolume",localStats.dataVolume)
.add("headerVolume",localStats.headerVolume)
......
......@@ -41,8 +41,8 @@ namespace daemon {
/** Cumulated time spent computing checksums */
double checksumingTime;
/** Cumulated time spent transfering data with the drive (for both data and headers). */
double transferTime;
/** Cumulated time spent reading and writing data with the drive (for both data and headers). */
double readWriteTime;
/** Cumulated time spent flushing */
double flushTime;
......@@ -65,6 +65,13 @@ namespace daemon {
/** Cumulated time spent reporting */
double waitReportingTime;
/** Time spent during the session, except mounting, positioning and
* unloading / unmounting. This a derived value */
double transferTime() const {
return checksumingTime + readWriteTime + flushTime + waitDataTime +
waitFreeMemoryTime + waitInstructionsTime + waitReportingTime;
}
/** Total time of the session, computed in parallel */
double totalTime;
......@@ -82,7 +89,7 @@ namespace daemon {
/** Constructor: all defaults are zero */
TapeSessionStats(): mountTime(0.0), positionTime(0.0), checksumingTime(0.0),
transferTime(0.0), flushTime(0.0), unloadTime(0.0), unmountTime(0.0),
readWriteTime(0.0), flushTime(0.0), unloadTime(0.0), unmountTime(0.0),
waitDataTime(0.0), waitFreeMemoryTime(0.0), waitInstructionsTime(0.0),
waitReportingTime(0.0), totalTime(0.0), dataVolume(0), headerVolume(0),
filesCount(0) {}
......@@ -92,7 +99,7 @@ namespace daemon {
mountTime += other.mountTime;
positionTime += other.positionTime;
checksumingTime += other.checksumingTime;
transferTime += other.transferTime;
readWriteTime += other.readWriteTime;
flushTime += other.flushTime;
unloadTime += other.unloadTime;
unmountTime += other.unmountTime;
......
......@@ -313,12 +313,13 @@ int level,const std::string& msg, log::ScopedParamContainer& params){
.add("positionTime", m_stats.positionTime)
.add("waitInstructionsTime", m_stats.waitInstructionsTime)
.add("checksumingTime", m_stats.checksumingTime)
.add("transferTime", m_stats.transferTime)
.add("readWriteTime", m_stats.readWriteTime)
.add("waitDataTime", m_stats.waitDataTime)
.add("waitReportingTime", m_stats.waitReportingTime)
.add("flushTime", m_stats.flushTime)
.add("unloadTime", m_stats.unloadTime)
.add("unmountTime", m_stats.unmountTime)
.add("transferTime", m_stats.transferTime())
.add("totalTime", m_stats.totalTime)
.add("dataVolume", m_stats.dataVolume)
.add("headerVolume", m_stats.headerVolume)
......
......@@ -97,7 +97,7 @@ namespace daemon {
currentErrorToCount = "Error_tapeWriteHeader";
watchdog.notifyBeginNewJob(*m_fileToMigrate);
std::auto_ptr<castor::tape::tapeFile::WriteFile> output(openWriteFile(session,lc));
m_taskStats.transferTime += timer.secs(castor::utils::Timer::resetCounter);
m_taskStats.readWriteTime += timer.secs(castor::utils::Timer::resetCounter);
m_taskStats.headerVolume += TapeSessionStats::headerVolumePerFile;
// We are not error sources here until we actually write.
currentErrorToCount = "";
......@@ -115,7 +115,7 @@ namespace daemon {
mb->m_payload.write(*output);
currentErrorToCount = "";
m_taskStats.transferTime += timer.secs(castor::utils::Timer::resetCounter);
m_taskStats.readWriteTime += timer.secs(castor::utils::Timer::resetCounter);
m_taskStats.dataVolume += mb->m_payload.size();
watchdog.notify();
++memBlockId;
......@@ -126,7 +126,7 @@ namespace daemon {
currentErrorToCount = "Error_tapeWriteTrailer";
output->close();
currentErrorToCount = "";
m_taskStats.transferTime += timer.secs(castor::utils::Timer::resetCounter);
m_taskStats.readWriteTime += timer.secs(castor::utils::Timer::resetCounter);
m_taskStats.headerVolume += TapeSessionStats::trailerVolumePerFile;
m_taskStats.filesCount ++;
reportPacker.reportCompletedJob(*m_fileToMigrate,ckSum,output->getBlockId());
......@@ -301,10 +301,11 @@ namespace daemon {
void TapeWriteTask::logWithStats(int level, const std::string& msg,
log::LogContext& lc) const{
log::ScopedParamContainer params(lc);
params.add("transferTime", m_taskStats.transferTime)
params.add("readWriteTime", m_taskStats.readWriteTime)
.add("checksumingTime",m_taskStats.checksumingTime)
.add("waitDataTime",m_taskStats.waitDataTime)
.add("waitReportingTime",m_taskStats.waitReportingTime)
.add("transferTime",m_taskStats.transferTime())
.add("totalTime", m_taskStats.totalTime)
.add("dataVolume",m_taskStats.dataVolume)
.add("headerVolume",m_taskStats.headerVolume)
......
......@@ -160,10 +160,11 @@ protected:
paramList.push_back(Param("waitDataTime", m_stats.waitDataTime));
paramList.push_back(Param("waitReportingTime", m_stats.waitReportingTime));
paramList.push_back(Param("checksumingTime", m_stats.checksumingTime));
paramList.push_back(Param("transferTime", m_stats.transferTime));
paramList.push_back(Param("readWriteTime", m_stats.readWriteTime));
paramList.push_back(Param("flushTime", m_stats.flushTime));
paramList.push_back(Param("unloadTime", m_stats.unloadTime));
paramList.push_back(Param("unmountTime", m_stats.unmountTime));
paramList.push_back(Param("transferTime", m_stats.transferTime()));
paramList.push_back(Param("totalTime", totalTime));
paramList.push_back(Param("dataVolume", m_stats.dataVolume));
paramList.push_back(Param("filesCount", m_stats.filesCount));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment