Skip to content

Commit

Permalink
Merge pull request #2616 from JasonRuonanWang/dataman
Browse files Browse the repository at this point in the history
added total average latency into dataman monitor
  • Loading branch information
JasonRuonanWang authored Feb 11, 2021
2 parents 2af857a + 1a81b20 commit 3caa96f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/adios2/engine/dataman/DataManMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ void DataManMonitor::AddLatencyMilliseconds(const uint64_t remoteStamp)
std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::system_clock::now().time_since_epoch())
.count();
m_LatencyMilliseconds.push_back(localStamp - remoteStamp - m_ClockError);
uint64_t latency = localStamp - remoteStamp - m_ClockError;
m_LatencyMilliseconds.push_back(latency);
m_AccumulatedLatency += latency;
}

void DataManMonitor::EndStep(const size_t step)
Expand Down Expand Up @@ -126,8 +128,12 @@ void DataManMonitor::EndStep(const size_t step)
<< ", Total MB/s " << m_TotalRate << ", "
<< m_StepTimers.size() << " step average MB/s "
<< m_AverageRate << ", Drop rate " << m_DropRate * 100 << "%"
<< ", Steps per second " << m_StepsPerSecond
<< ", Average latency milliseconds " << averageLatency
<< ", Steps per second " << m_StepsPerSecond << ", "
<< m_StepTimers.size()
<< " step average latency milliseconds " << averageLatency
<< ", Average latency milliseconds "
<< m_AccumulatedLatency /
static_cast<double>(m_CurrentStep + 1)
<< std::endl;
}
}
Expand Down
1 change: 1 addition & 0 deletions source/adios2/engine/dataman/DataManMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class DataManMonitor
double m_AverageRate = 0;
double m_DropRate = 0;
double m_StepsPerSecond = 0;
double m_AccumulatedLatency = 0;

bool m_Verbose = true;
};
Expand Down

0 comments on commit 3caa96f

Please sign in to comment.