[Libreoffice-commits] online.git: wsd/AdminModel.cpp

Gabriel Masei (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 27 14:21:23 UTC 2020


 wsd/AdminModel.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 93bd4875a23c6731ef370b93f63eaa83926d925f
Author:     Gabriel Masei <gabriel.masei at 1and1.ro>
AuthorDate: Mon Apr 27 17:03:52 2020 +0300
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Apr 27 16:21:01 2020 +0200

    admin: fix kit_memory_usage metrics computation
    
    Change-Id: I2f1d4f2320336e690fcf84fb9c26b5142f53508e
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92979
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/wsd/AdminModel.cpp b/wsd/AdminModel.cpp
index e2ba77898..18ccb62f1 100644
--- a/wsd/AdminModel.cpp
+++ b/wsd/AdminModel.cpp
@@ -915,7 +915,7 @@ struct DocumentAggregateStats
 {
     void Update(const Document &d, bool active)
     {
-        _kitUsedMemory.Update(d.getMemoryDirty(), active);
+        _kitUsedMemory.Update(d.getMemoryDirty() * 1024, active);
         _viewsCount.Update(d.getViews().size(), active);
         _activeViewsCount.Update(d.getActiveViews(), active);
         _expiredViewsCount.Update(d.getViews().size() - d.getActiveViews(), active);
@@ -1012,7 +1012,7 @@ void AdminModel::getMetrics(std::ostringstream &oss)
     oss << "kit_assigned_count " << kitStats.assignedCount << std::endl;
     oss << "kit_segfault_count " << _segFaultCount << std::endl;
     PrintKitAggregateMetrics(oss, "thread_count", "", kitStats._threadCount);
-    PrintKitAggregateMetrics(oss, "memory_used", "bytes", docStats._kitUsedMemory._all);
+    PrintKitAggregateMetrics(oss, "memory_used", "bytes", docStats._kitUsedMemory._active);
     PrintKitAggregateMetrics(oss, "cpu_time", "seconds", kitStats._cpuTime);
     oss << std::endl;
 


More information about the Libreoffice-commits mailing list