Commit f664cbb5 authored by David Schulz's avatar David Schulz

Cdb: Add benchmark to cdbextension

Change-Id: I830f5997f230435c400c0e688420af915263027a
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 4133ff0a
......@@ -63,6 +63,18 @@ struct DebugPrint : public std::ostringstream {
}
};
struct Bench
{
Bench(const std::string &what) : m_initialTickCount(GetTickCount()), m_what(what) {}
~Bench()
{
DebugPrint() << m_what << " took "
<< GetTickCount() - m_initialTickCount << "ms to execute." << std::endl;
}
const DWORD m_initialTickCount;
const std::string m_what;
};
ULONG currentThreadId(IDebugSystemObjects *sysObjects);
ULONG currentThreadId(CIDebugClient *client);
ULONG currentProcessId(IDebugSystemObjects *sysObjects);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment