forked from qt-creator/qt-creator
Cdb: Add benchmark to cdbextension
Change-Id: I830f5997f230435c400c0e688420af915263027a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -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(IDebugSystemObjects *sysObjects);
|
||||||
ULONG currentThreadId(CIDebugClient *client);
|
ULONG currentThreadId(CIDebugClient *client);
|
||||||
ULONG currentProcessId(IDebugSystemObjects *sysObjects);
|
ULONG currentProcessId(IDebugSystemObjects *sysObjects);
|
||||||
|
Reference in New Issue
Block a user