Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ksystemstats5 for openSUSE:Factory 
checked in at 2023-08-02 16:48:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ksystemstats5 (Old)
 and      /work/SRC/openSUSE:Factory/.ksystemstats5.new.22712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ksystemstats5"

Wed Aug  2 16:48:35 2023 rev:38 rq:1101810 version:5.27.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/ksystemstats5/ksystemstats5.changes      
2023-06-21 22:38:31.825891374 +0200
+++ /work/SRC/openSUSE:Factory/.ksystemstats5.new.22712/ksystemstats5.changes   
2023-08-02 16:49:29.089030644 +0200
@@ -1,0 +2,10 @@
+Tue Aug  1 11:18:54 UTC 2023 - Fabian Vogt <fab...@ritter-vogt.de>
+
+- Update to 5.27.7
+  * New bugfix release
+  * For more details please see:
+  * https://kde.org/announcements/plasma/5/5.27.7
+- Changes since 5.27.6:
+  * gpu/nvidia: Discover data fields based on headers (kde#470474)
+
+-------------------------------------------------------------------

Old:
----
  ksystemstats-5.27.6.tar.xz
  ksystemstats-5.27.6.tar.xz.sig

New:
----
  ksystemstats-5.27.7.tar.xz
  ksystemstats-5.27.7.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ksystemstats5.spec ++++++
--- /var/tmp/diff_new_pack.LJaWSD/_old  2023-08-02 16:49:30.121038730 +0200
+++ /var/tmp/diff_new_pack.LJaWSD/_new  2023-08-02 16:49:30.133038824 +0200
@@ -19,7 +19,7 @@
 
 %bcond_without released
 Name:           ksystemstats5
-Version:        5.27.6
+Version:        5.27.7
 Release:        0
 # Full Plasma 5 version (e.g. 5.8.95)
 %{!?_plasma5_bugfix: %define _plasma5_bugfix %{version}}

++++++ ksystemstats-5.27.6.tar.xz -> ksystemstats-5.27.7.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksystemstats-5.27.6/CMakeLists.txt 
new/ksystemstats-5.27.7/CMakeLists.txt
--- old/ksystemstats-5.27.6/CMakeLists.txt      2023-06-20 15:32:26.000000000 
+0200
+++ new/ksystemstats-5.27.7/CMakeLists.txt      2023-08-01 11:25:26.000000000 
+0200
@@ -4,7 +4,7 @@
 cmake_minimum_required(VERSION 3.16)
 
 project(ksystemstats)
-set(PROJECT_VERSION "5.27.6")
+set(PROJECT_VERSION "5.27.7")
 
 set(QT_MIN_VERSION "5.15.2")
 set(KF5_MIN_VERSION "5.102.0")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksystemstats-5.27.6/plugins/gpu/NvidiaSmiProcess.cpp 
new/ksystemstats-5.27.7/plugins/gpu/NvidiaSmiProcess.cpp
--- old/ksystemstats-5.27.6/plugins/gpu/NvidiaSmiProcess.cpp    2023-06-20 
15:32:26.000000000 +0200
+++ new/ksystemstats-5.27.7/plugins/gpu/NvidiaSmiProcess.cpp    2023-08-01 
11:25:26.000000000 +0200
@@ -155,19 +155,37 @@
 void NvidiaSmiProcess::readStatisticsData()
 {
     while (m_process->canReadLine()) {
-        const QString line = m_process->readLine();
-        if (line.startsWith(QLatin1Char('#'))) {
-            continue;
-        }
+        QString line = m_process->readLine();
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-        const QVector<QStringRef> parts = 
QStringRef(&line).trimmed().split(QLatin1Char(' '), Qt::SkipEmptyParts);
+        QVector<QStringRef> parts = 
QStringRef(&line).trimmed().split(QLatin1Char(' '), Qt::SkipEmptyParts);
 #else
-        const QVector<QStringView> parts = 
QStringView(line).trimmed().split(QLatin1Char(' '), Qt::SkipEmptyParts);
+        QVector<QStringView> parts = 
QStringView(line).trimmed().split(QLatin1Char(' '), Qt::SkipEmptyParts);
 #endif
-
-        // format at time of writing is
-        // # gpu   pwr gtemp mtemp    sm   mem   enc   dec  mclk  pclk  fb  
bar1
-        if (parts.count() != 12) {
+        // Because in Qt5 indexOf of QVector<T> only takes T's, write our own 
indexOf taking arbitrary types
+        auto indexOf = [](const auto &stack, const auto& needle) {
+            auto it = std::find(stack.cbegin(), stack.cend(), needle);
+            return it != stack.cend() ? std::distance(stack.cbegin(), it) : -1;
+        };
+
+        // discover index of fields in the header format is something like
+        //# gpu   pwr gtemp mtemp    sm   mem   enc   dec  mclk  pclk    fb  
bar1
+        // # Idx     W     C     C     %     %     %     %   MHz   MHz    MB   
 MB
+        // 0     25     29      -     1      1      0      0   4006   1506    
891     22
+        if (line.startsWith(QLatin1Char('#'))) {
+            if (m_dmonIndices.gpu == -1) {
+                // Remove First part because of leading '# ';
+                parts.removeFirst();
+                m_dmonIndices.gpu = indexOf(parts, QLatin1String("gpu"));
+                m_dmonIndices.power = indexOf(parts, QLatin1String("pwr"));
+                m_dmonIndices.gtemp = indexOf(parts, QLatin1String("gtemp"));
+                m_dmonIndices.sm = indexOf(parts, QLatin1String("sm"));
+                m_dmonIndices.enc = indexOf(parts, QLatin1String("enc"));
+                m_dmonIndices.dec = indexOf(parts, QLatin1String("dec"));
+                m_dmonIndices.fb = indexOf(parts, QLatin1String("fb"));
+                m_dmonIndices.bar1 = indexOf(parts, QLatin1String("bar1"));
+                m_dmonIndices.mclk = indexOf(parts, QLatin1String("mclk"));
+                m_dmonIndices.pclk = indexOf(parts, QLatin1String("pclk"));
+            }
             continue;
         }
 
@@ -177,19 +195,23 @@
             continue;
         }
 
+        auto readDataIfFound =  [&parts, this] (int index) {
+            return index > 0 ? parts[index].toUInt() : 0;
+        };
+
         GpuData data;
-        data.index = index;
-        data.power = parts[1].toUInt();
-        data.temperature = parts[2].toUInt();
+        data.index = readDataIfFound(m_dmonIndices.gpu);
+        data.power = readDataIfFound(m_dmonIndices.power);
+        data.temperature = readDataIfFound(m_dmonIndices.gtemp);
 
         // GPU usage equals "SM" usage + "ENC" usage + "DEC" usage
-        data.usage = parts[4].toUInt() + parts[6].toUInt() + parts[7].toUInt();
+        data.usage = readDataIfFound(m_dmonIndices.sm) + 
readDataIfFound(m_dmonIndices.enc) + readDataIfFound(m_dmonIndices.dec);
 
         // Total memory used equals "FB" usage + "BAR1" usage
-        data.memoryUsed = parts[10].toUInt() + parts[11].toUInt();
+        data.memoryUsed = readDataIfFound(m_dmonIndices.fb) + 
readDataIfFound(m_dmonIndices.bar1);
 
-        data.memoryFrequency = parts[8].toUInt();
-        data.coreFrequency = parts[9].toUInt();
+        data.memoryFrequency = readDataIfFound(m_dmonIndices.mclk);
+        data.coreFrequency = readDataIfFound(m_dmonIndices.pclk);
 
         Q_EMIT dataReceived(data);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksystemstats-5.27.6/plugins/gpu/NvidiaSmiProcess.h 
new/ksystemstats-5.27.7/plugins/gpu/NvidiaSmiProcess.h
--- old/ksystemstats-5.27.6/plugins/gpu/NvidiaSmiProcess.h      2023-06-20 
15:32:26.000000000 +0200
+++ new/ksystemstats-5.27.7/plugins/gpu/NvidiaSmiProcess.h      2023-08-01 
11:25:26.000000000 +0200
@@ -49,8 +49,22 @@
 private:
     void readStatisticsData();
 
+    struct dmonIndices {
+        int gpu = -1;
+        int gtemp = -1;
+        int power = -1;
+        int sm = -1;
+        int enc = -1;
+        int dec = -1;
+        int fb = -1;
+        int bar1 = -1;
+        int mclk = -1;
+        int pclk = -1;
+    };
+
     QString m_smiPath;
     std::vector<GpuQueryResult> m_queryResult;
     std::unique_ptr<QProcess> m_process = nullptr;
     int m_references = 0;
+    dmonIndices m_dmonIndices;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksystemstats-5.27.6/po/ko/ksystemstats_plugins.po 
new/ksystemstats-5.27.7/po/ko/ksystemstats_plugins.po
--- old/ksystemstats-5.27.6/po/ko/ksystemstats_plugins.po       2023-06-20 
15:32:26.000000000 +0200
+++ new/ksystemstats-5.27.7/po/ko/ksystemstats_plugins.po       2023-08-01 
11:25:26.000000000 +0200
@@ -589,19 +589,19 @@
 #, kde-format
 msgctxt "@title"
 msgid "Application Memory"
-msgstr "프로그램 메모리"
+msgstr "앱 메모리"
 
 #: memory/backend.cpp:63
 #, kde-format
 msgctxt "@title, Short for 'Application Memory'"
 msgid "Application"
-msgstr "프로그램"
+msgstr "앱"
 
 #: memory/backend.cpp:67
 #, kde-format
 msgctxt "@title"
 msgid "Application Memory Percentage"
-msgstr "프로그램 메모리 백분율"
+msgstr "앱 메모리 백분율"
 
 #: memory/backend.cpp:71
 #, kde-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksystemstats-5.27.6/po/zh_CN/ksystemstats_plugins.po 
new/ksystemstats-5.27.7/po/zh_CN/ksystemstats_plugins.po
--- old/ksystemstats-5.27.6/po/zh_CN/ksystemstats_plugins.po    2023-06-20 
15:32:26.000000000 +0200
+++ new/ksystemstats-5.27.7/po/zh_CN/ksystemstats_plugins.po    2023-08-01 
11:25:26.000000000 +0200
@@ -3,7 +3,7 @@
 "Project-Id-Version: kdeorg\n"
 "Report-Msgid-Bugs-To: https://bugs.kde.org\n";
 "POT-Creation-Date: 2023-01-12 00:56+0000\n"
-"PO-Revision-Date: 2023-06-17 04:14\n"
+"PO-Revision-Date: 2023-07-30 07:13\n"
 "Last-Translator: \n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"

Reply via email to