Commit 16240d89 authored by Eric Cano's avatar Eric Cano
Browse files

Added timing logs when reporting archival to EOS.

parent 10061318
......@@ -54,11 +54,19 @@ bool cta::ArchiveJob::checkAndAsyncReportComplete() {
if (m_dbJob->checkSucceed()) {
m_reporter.reset(m_mount.createDiskReporter(m_dbJob->archiveReportURL, m_reporterState));
m_reporter->asyncReportArchiveFullyComplete();
m_reporterTimer.reset();
return true;
}
return false;
}
//------------------------------------------------------------------------------
// getReportTiming()
//------------------------------------------------------------------------------
double cta::ArchiveJob::reportTime() {
return m_reporterTimer.secs();
}
//------------------------------------------------------------------------------
// ArchiveJob::writeToCatalogue
//------------------------------------------------------------------------------
......
......@@ -20,6 +20,7 @@
#include "common/exception/Exception.hpp"
#include "common/remoteFS/RemotePathAndStatus.hpp"
#include "common/Timer.hpp"
#include "scheduler/SchedulerDatabase.hpp"
#include "catalogue/Catalogue.hpp"
#include "eos/DiskReporter.hpp"
......@@ -83,6 +84,11 @@ public:
*/
virtual bool checkAndAsyncReportComplete();
/**
* Get the report time (in seconds).
*/
double reportTime();
/**
* Validate that archiveFile and tapeFile fields are set correctly for archive
* request.
......@@ -124,10 +130,15 @@ private:
std::unique_ptr<cta::SchedulerDatabase::ArchiveJob> m_dbJob;
/**
* The reporter for the job.
* The reporter for the job. TODO: this should be generic and fed with a factory.
*/
std::unique_ptr<cta::eos::DiskReporter> m_reporter;
/**
* Report time measurement.
*/
utils::Timer m_reporterTimer;
/**
* The mount that generated this job
*/
......
......@@ -292,7 +292,8 @@ void MigrationReportPacker::ReportFlush::checkAndAsyncReportCompletedJobs(
"In MigrationReportPacker::ReportFlush::checkAndAsyncReportCompletedJobs()"
" check for async backend update finished");
if(job->checkAndAsyncReportComplete()) {
params.add("reportURL", job->reportURL());
params.add("reportURL", job->reportURL())
.add("reportTime", job->reportTime());
reportedArchiveJobs.emplace_back(std::move(job));
logContext.log(cta::log::INFO,"Sent to the client a full file archival");
} else {
......
Supports Markdown
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