debugger: enhance time logging for individual commands

This commit is contained in:
hjk
2009-07-06 11:37:21 +02:00
parent 09a4409c2a
commit eb83377f5a
3 changed files with 9 additions and 1 deletions

View File

@@ -738,6 +738,7 @@ void GdbEngine::postCommand(const QString &command, GdbCommandFlags flags,
void GdbEngine::flushCommand(GdbCommand &cmd)
{
++currentToken();
cmd.postTime = QTime::currentTime();
m_cookieForToken[currentToken()] = cmd;
cmd.command = QString::number(currentToken()) + cmd.command;
if (cmd.flags & EmbedToken)
@@ -761,6 +762,11 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
return;
GdbCommand cmd = m_cookieForToken.take(token);
if (theDebuggerBoolSetting(LogTimeStamps)) {
emit gdbOutputAvailable(LogTime, _("Response time: %1: %2 s")
.arg(cmd.command)
.arg(cmd.postTime.msecsTo(QTime::currentTime()) / 1000.));
}
if (record.token < m_oldestAcceptableToken && (cmd.flags & Discardable)) {
//qDebug() << "### SKIPPING OLD RESULT" << record.toString();