Skip to content
Snippets Groups Projects
Commit 6003a69a authored by williamfgc's avatar williamfgc Committed by GitHub
Browse files

Merge pull request #138 from williamfgc/profiling

Added Date and Time to profiling.log
parents c8933cfe 95006a7e
No related branches found
No related tags found
No related merge requests found
......@@ -313,19 +313,19 @@ BP1Base::GetTransportIDs(const std::vector<std::string> &transportsTypes) const
auto lf_GetTransportID = [](const std::string method) -> uint8_t {
int id = METHOD_UNKNOWN;
if (method == "NULL")
if (method == "File_NULL")
{
id = METHOD_NULL;
}
else if (method == "FileDescriptor")
else if (method == "File_POSIX")
{
id = METHOD_POSIX;
}
else if (method == "FileStream")
else if (method == "File_fstream")
{
id = METHOD_FSTREAM;
}
else if (method == "FilePointer")
else if (method == "File_stdio")
{
id = METHOD_FILE;
}
......
......@@ -188,8 +188,12 @@ std::string BP1Writer::GetRankProfilingLog(
"': { ");
auto &profiler = m_Profiler;
rankLog +=
"'bytes': " + std::to_string(profiler.Bytes.at("buffering")) + ", ";
std::string timeDate(profiler.Timers.at("buffering").m_LocalTimeDate);
timeDate.pop_back();
rankLog += "'date_and_time': '" + timeDate + "', " + "'bytes': " +
std::to_string(profiler.Bytes.at("buffering")) + ", ";
lf_WriterTimer(rankLog, profiler.Timers.at("buffering"));
const size_t transportsSize = transportsTypes.size();
......@@ -197,7 +201,7 @@ std::string BP1Writer::GetRankProfilingLog(
for (unsigned int t = 0; t < transportsSize; ++t)
{
rankLog += "'transport_" + std::to_string(t) + "': { ";
rankLog += "'lib': '" + transportsTypes[t] + "', ";
rankLog += "'type': '" + transportsTypes[t] + "', ";
for (const auto &transportTimerPair : transportsProfilers[t]->Timers)
{
......
......@@ -20,7 +20,7 @@ namespace transport
{
FilePointer::FilePointer(MPI_Comm mpiComm, const bool debugMode)
: Transport("File", "C stdio.h", mpiComm, debugMode)
: Transport("File", "stdio", mpiComm, debugMode)
{
}
......
......@@ -104,7 +104,7 @@ std::vector<std::string> TransportMan::GetTransportsTypes() noexcept
for (const auto &transport : m_Transports)
{
types.push_back(transport->m_Type);
types.push_back(transport->m_Type + "_" + transport->m_Library);
}
return types;
}
......
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