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:
parent
dcfa259b4e
commit
9dbc213337
1 changed files with 4 additions and 0 deletions
|
@ -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::milliseconds>
|
||||
(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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue