Skip to content
Snippets Groups Projects
Commit 70640042 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #3566: Parse final duration and size of measurement set

parent 7ce7ff2c
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,7 @@ void CEPFeedback::addSubband(unsigned index)
{
setSubbandKey(index, "fileFormat", "AIPS++/CASA");
setSubbandKey(index, "filename", "");
setSubbandKey(index, "size", "0");
setSubbandKey(index, "location", "");
setSubbandKey(index, "percentageWritten", "0");
setSubbandKey(index, "startTime", "");
......@@ -1152,6 +1153,20 @@ void CEPlogProcessor::_processStorageLine(const struct logline &logline)
}
}
if ((result = strstr(logline.msg, "Final characteristics: "))) {
int bytes = 0;
double duration = 0.0;
if (sscanf(result, "Final characteristics: duration %lf s, size %d bytes", &duration, &bytes) == 2) {
if (feedback) {
feedback->setSubbandKey(streamNr, "size", formatString("%d", bytes));
feedback->setSubbandKey(streamNr, "duration", formatString("%.4lf", duration));
}
LOG_DEBUG_STR("Observation " << logline.obsID << " stream " << streamNr << " has " << duration << " s duration and is " << bytes << " bytes");
}
}
// Storage_main@locus088 10-02-12 13:20:01.056 INFO [obs 45784 type 2 stream 12 writer 0] [OutputThread] Written block with seqno = 479, 480 blocks written, 0 blocks dropped
if ((result = strstr(logline.msg, "Written block"))) {
int seqno = 0, written = 0, dropped = 0, perc_written = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment