2020-01-05 15:21:34 +00:00
|
|
|
#include "function-trace.hh"
|
2020-01-22 20:58:07 +00:00
|
|
|
#include "logging.hh"
|
2020-01-05 15:21:34 +00:00
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
FunctionCallTrace::FunctionCallTrace(const Pos & pos) : pos(pos) {
|
|
|
|
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
|
|
|
auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
|
|
|
|
printMsg(lvlInfo, "function-trace entered %1% at %2%", pos, ns.count());
|
|
|
|
}
|
|
|
|
|
|
|
|
FunctionCallTrace::~FunctionCallTrace() {
|
|
|
|
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
|
|
|
auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
|
|
|
|
printMsg(lvlInfo, "function-trace exited %1% at %2%", pos, ns.count());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|