mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Hadrons: global measurement time profile
This commit is contained in:
parent
503259f9c9
commit
07a0ef3f95
@ -664,6 +664,7 @@ void VirtualMachine::executeProgram(const Program &p)
|
|||||||
|
|
||||||
// program execution
|
// program execution
|
||||||
LOG(Debug) << "Executing program..." << std::endl;
|
LOG(Debug) << "Executing program..." << std::endl;
|
||||||
|
totalTime_ = GridTime::zero();
|
||||||
for (unsigned int i = 0; i < p.size(); ++i)
|
for (unsigned int i = 0; i < p.size(); ++i)
|
||||||
{
|
{
|
||||||
// execute module
|
// execute module
|
||||||
@ -693,6 +694,8 @@ void VirtualMachine::executeProgram(const Program &p)
|
|||||||
LOG(Message) << "* CUSTOM TIMERS" << std::endl;
|
LOG(Message) << "* CUSTOM TIMERS" << std::endl;
|
||||||
printTimeProfile(ctiming, total);
|
printTimeProfile(ctiming, total);
|
||||||
}
|
}
|
||||||
|
timeProfile_[module_[p[i]].name] = total;
|
||||||
|
totalTime_ += total;
|
||||||
// print used memory after execution
|
// print used memory after execution
|
||||||
LOG(Message) << SMALL_SEP << " Memory management" << std::endl;
|
LOG(Message) << SMALL_SEP << " Memory management" << std::endl;
|
||||||
LOG(Message) << "Allocated objects: " << MEM_MSG(sizeBefore)
|
LOG(Message) << "Allocated objects: " << MEM_MSG(sizeBefore)
|
||||||
@ -719,6 +722,11 @@ void VirtualMachine::executeProgram(const Program &p)
|
|||||||
LOG(Message) << "Nothing to free" << std::endl;
|
LOG(Message) << "Nothing to free" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// print total time profile
|
||||||
|
LOG(Message) << SEP << " Measurement time profile" << SEP << std::endl;
|
||||||
|
LOG(Message) << "Total measurement time: " << totalTime_ << " us" << std::endl;
|
||||||
|
LOG(Message) << SMALL_SEP << " Module breakdown" << std::endl;
|
||||||
|
printTimeProfile(timeProfile_, totalTime_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VirtualMachine::executeProgram(const std::vector<std::string> &p)
|
void VirtualMachine::executeProgram(const std::vector<std::string> &p)
|
||||||
|
@ -165,7 +165,10 @@ private:
|
|||||||
Graph<unsigned int> graph_;
|
Graph<unsigned int> graph_;
|
||||||
// memory profile
|
// memory profile
|
||||||
bool memoryProfileOutdated_{true};
|
bool memoryProfileOutdated_{true};
|
||||||
MemoryProfile profile_;
|
MemoryProfile profile_;
|
||||||
|
// time profile
|
||||||
|
GridTime totalTime_;
|
||||||
|
std::map<std::string, GridTime> timeProfile_;
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user