From 9dbc213337cb6118d1651fbbd2e5ae994bee317e Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 22 May 2016 19:17:01 -0400 Subject: [PATCH] loolwsd: log tile rendering rountrip time Change-Id: Ib97e196d6de053e6b79ea448296003f30a5949b5 Reviewed-on: https://gerrit.libreoffice.org/25347 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian --- loolwsd/TileCache.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp index 6a6dc79b4..7be1960e3 100644 --- a/loolwsd/TileCache.cpp +++ b/loolwsd/TileCache.cpp @@ -86,6 +86,8 @@ struct TileCache::TileBeingRendered int getVersion() const { return _ver; } std::chrono::steady_clock::time_point getStartTime() const { return _startTime; } + double getElapsedTimeMs() const { return std::chrono::duration_cast + (std::chrono::steady_clock::now() - _startTime).count(); } void resetStartTime() { _startTime = std::chrono::steady_clock::now(); @@ -181,6 +183,8 @@ void TileCache::saveTileAndNotify(const TileDesc& tile, const char *data, const // Remove subscriptions. if (tileBeingRendered->getVersion() == tile.getVersion()) { + Log::debug() << "STATISTICS: tile internal roundtrip " + << tileBeingRendered->getElapsedTimeMs() << " ms." << Log::end; _tilesBeingRendered.erase(cachedName); } }