[Libreoffice-commits] online.git: loolwsd/TileCache.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon May 23 01:58:43 UTC 2016


 loolwsd/TileCache.cpp |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 9dbc213337cb6118d1651fbbd2e5ae994bee317e
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun May 22 19:17:01 2016 -0400

    loolwsd: log tile rendering rountrip time
    
    Change-Id: Ib97e196d6de053e6b79ea448296003f30a5949b5
    Reviewed-on: https://gerrit.libreoffice.org/25347
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index 6a6dc79..7be1960 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::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);
         }
     }


More information about the Libreoffice-commits mailing list