loolwsd: log tile rendering rountrip time

Change-Id: Ib97e196d6de053e6b79ea448296003f30a5949b5
Reviewed-on: https://gerrit.libreoffice.org/25347
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2016-05-22 19:17:01 -04:00 committed by Ashod Nakashian
parent dcfa259b4e
commit 9dbc213337

View file

@ -86,6 +86,8 @@ struct TileCache::TileBeingRendered
int getVersion() const { return _ver; } int getVersion() const { return _ver; }
std::chrono::steady_clock::time_point getStartTime() const { return _startTime; } std::chrono::steady_clock::time_point getStartTime() const { return _startTime; }
double getElapsedTimeMs() const { return std::chrono::duration_cast<std::chrono::milliseconds>
(std::chrono::steady_clock::now() - _startTime).count(); }
void resetStartTime() void resetStartTime()
{ {
_startTime = std::chrono::steady_clock::now(); _startTime = std::chrono::steady_clock::now();
@ -181,6 +183,8 @@ void TileCache::saveTileAndNotify(const TileDesc& tile, const char *data, const
// Remove subscriptions. // Remove subscriptions.
if (tileBeingRendered->getVersion() == tile.getVersion()) if (tileBeingRendered->getVersion() == tile.getVersion())
{ {
Log::debug() << "STATISTICS: tile internal roundtrip "
<< tileBeingRendered->getElapsedTimeMs() << " ms." << Log::end;
_tilesBeingRendered.erase(cachedName); _tilesBeingRendered.erase(cachedName);
} }
} }