Core/Tickets: Add report time and current latency to lag_reports table

It's a tiny bit more useful now.
This commit is contained in:
Nay
2012-04-07 19:12:14 +01:00
parent ba3f25c143
commit 3d83f663f6
3 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
ALTER TABLE `lag_reports` ADD `latency` int(10) unsigned NOT NULL DEFAULT '0';
ALTER TABLE `lag_reports` ADD `createTime` int(10) unsigned NOT NULL DEFAULT '0';

View File

@@ -176,6 +176,8 @@ void WorldSession::HandleReportLag(WorldPacket& recv_data)
stmt->setFloat (3, x);
stmt->setFloat (4, y);
stmt->setFloat (5, z);
stmt->setUInt32(6, GetLatency());
stmt->setUInt32(7, time(NULL));
CharacterDatabase.Execute(stmt);
}

View File

@@ -335,7 +335,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
// GM Survey/subsurvey/lag report
PREPARE_STATEMENT(CHAR_INS_GM_SURVEY, "INSERT INTO gm_surveys (guid, surveyId, mainSurvey, overallComment, createTime) VALUES (?, ?, ?, ?, UNIX_TIMESTAMP(NOW()))", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_GM_SUBSURVEY, "INSERT INTO gm_subsurveys (surveyId, subsurveyId, rank, comment) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_LAG_REPORT, "INSERT INTO lag_reports (guid, lagType, mapId, posX, posY, posZ) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_LAG_REPORT, "INSERT INTO lag_reports (guid, lagType, mapId, posX, posY, posZ, latency, createTime) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC)
// For loading and deleting expired auctions at startup
PREPARE_STATEMENT(CHAR_SEL_EXPIRED_AUCTIONS, "SELECT id, auctioneerguid, itemguid, itemEntry, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid WHERE ah.time <= ?", CONNECTION_SYNCH)