Hello community,

here is the log from the commit of package powerstat for openSUSE:Factory 
checked in at 2018-07-25 16:13:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powerstat (Old)
 and      /work/SRC/openSUSE:Factory/.powerstat.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "powerstat"

Wed Jul 25 16:13:07 2018 rev:6 rq:625117 version:0.02.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/powerstat/powerstat.changes      2018-06-07 
19:56:44.447576233 +0200
+++ /work/SRC/openSUSE:Factory/.powerstat.new/powerstat.changes 2018-07-25 
16:13:12.205933717 +0200
@@ -1,0 +2,9 @@
+Mon Jul 23 06:24:59 UTC 2018 - [email protected]
+
+- update to version 0.02.18
+  * Makefile: bump version
+  * Rename snapcraft directory to snap, add .travis.yml file to dist rule
+  * Compute Geometric Mean without overflow with large sets of data
+  * Add travis yaml file
+
+-------------------------------------------------------------------

Old:
----
  powerstat-0.02.17.tar.gz

New:
----
  powerstat-0.02.18.tar.gz

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

Other differences:
------------------
++++++ powerstat.spec ++++++
--- /var/tmp/diff_new_pack.YY4LpM/_old  2018-07-25 16:13:12.793934872 +0200
+++ /var/tmp/diff_new_pack.YY4LpM/_new  2018-07-25 16:13:12.797934880 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           powerstat
-Version:        0.02.17
+Version:        0.02.18
 Release:        0
 Summary:        Laptop power measuring tool
 License:        GPL-2.0-only

++++++ powerstat-0.02.17.tar.gz -> powerstat-0.02.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerstat-0.02.17/.travis.yml 
new/powerstat-0.02.18/.travis.yml
--- old/powerstat-0.02.17/.travis.yml   1970-01-01 01:00:00.000000000 +0100
+++ new/powerstat-0.02.18/.travis.yml   2018-07-23 00:19:00.000000000 +0200
@@ -0,0 +1,15 @@
+dist: bionic
+sudo: required
+
+matrix:
+    include:
+        - env: PEDANTIC=1
+
+before_install:
+    - sudo apt-get update -q
+    - sudo apt-get install build-essential
+
+language: c
+
+script:
+- make -j2 PEDANTIC=$PEDANTIC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerstat-0.02.17/Makefile 
new/powerstat-0.02.18/Makefile
--- old/powerstat-0.02.17/Makefile      2018-05-29 14:05:46.000000000 +0200
+++ new/powerstat-0.02.18/Makefile      2018-07-23 00:19:00.000000000 +0200
@@ -16,7 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
 #
 
-VERSION=0.02.17
+VERSION=0.02.18
 
 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"'
 
@@ -42,8 +42,8 @@
 dist:
        rm -rf powerstat-$(VERSION)
        mkdir powerstat-$(VERSION)
-       cp -rp Makefile mascot powerstat.c powerstat.8 COPYING snapcraft \
-               powerstat-$(VERSION)
+       cp -rp Makefile mascot powerstat.c powerstat.8 COPYING snap \
+               .travis.yml powerstat-$(VERSION)
        tar -zcf powerstat-$(VERSION).tar.gz powerstat-$(VERSION)
        rm -rf powerstat-$(VERSION)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerstat-0.02.17/powerstat.c 
new/powerstat-0.02.18/powerstat.c
--- old/powerstat-0.02.17/powerstat.c   2018-05-29 14:05:46.000000000 +0200
+++ new/powerstat-0.02.18/powerstat.c   2018-07-23 00:19:00.000000000 +0200
@@ -1108,23 +1108,34 @@
 
        for (j = 0; j < MAX_VALUES; j++) {
                double total = 0.0;
+               double mant = 1.0;
+               int64_t expon = 0;
 
                max->value[j] = -DBL_MAX;
                min->value[j] = DBL_MAX;
-               geometric_mean->value[j] = 1.0;
 
                for (valid = 0, i = 0; i < num; i++) {
                        if (!stats[i].inaccurate[j]) {
+                               int e;
+                               double f;
+
                                if (stats[i].value[j] > max->value[j])
                                        max->value[j] = stats[i].value[j];
                                if (stats[i].value[j] < min->value[j])
                                        min->value[j] = stats[i].value[j];
                                total += stats[i].value[j];
-                               geometric_mean->value[j] *= stats[i].value[j];
+                               
+                               f = frexp(stats[i].value[j], &e);
+                               mant *= f;
+                               expon += e;
                                valid++;
                        }
                }
                if (valid) {
+                       double inverse_n = 1.0 / (double)valid;
+
+                       geometric_mean->value[j] = pow(mant, inverse_n) * 
+                               pow(2.0, (double)expon / (double)valid);
                        average->value[j] = total / (double)valid;
                        total = 0.0;
                        for (i = 0; i < num; i++) {
@@ -1137,9 +1148,6 @@
                        }
                        stddev->value[j] = total / (double)num;
                        stddev->value[j] = sqrt(stddev->value[j]);
-
-                       geometric_mean->value[j] = (num == 0) ? 0.0 :
-                               pow(geometric_mean->value[j], 1.0 / 
(double)num);
                } else {
                        average->inaccurate[j] = true;
                        max->inaccurate[j] = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerstat-0.02.17/snap/Makefile 
new/powerstat-0.02.18/snap/Makefile
--- old/powerstat-0.02.17/snap/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/powerstat-0.02.18/snap/Makefile 2018-07-23 00:19:00.000000000 +0200
@@ -0,0 +1,18 @@
+VERSION=$(shell git tag | tail -1 | cut -c2-)
+COMMITS=$(shell git log --oneline | wc -l)
+SHA=$(shell git log -1 --oneline | cut -d' ' -f1)
+DATE=$(shell date +'%Y%m%d')
+V=$(VERSION)-$(DATE)-$(COMMITS)-$(SHA)
+
+all: set_version
+       snapcraft
+
+set_version:
+       cat snapcraft.yaml | sed 's/version: .*/version: $(V)/' > 
snapcraft-tmp.yaml
+       mv snapcraft-tmp.yaml snapcraft.yaml
+
+clean:
+       rm -rf setup *.snap
+       snapcraft clean
+       cat snapcraft.yaml | sed 's/version: .*/version: 0/' > 
snapcraft-tmp.yaml
+       mv snapcraft-tmp.yaml snapcraft.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerstat-0.02.17/snap/snapcraft.yaml 
new/powerstat-0.02.18/snap/snapcraft.yaml
--- old/powerstat-0.02.17/snap/snapcraft.yaml   1970-01-01 01:00:00.000000000 
+0100
+++ new/powerstat-0.02.18/snap/snapcraft.yaml   2018-07-23 00:19:00.000000000 
+0200
@@ -0,0 +1,21 @@
+name: powerstat
+version: 0.02.16-20180521-322-c35510c
+summary: computer power measuring tool
+description: Powerstat measures the power consumption of a computer that has a 
battery power source or an Intel RAPL power domain.  The output is like vmstat 
but also shows power consumption statistics.  At the end of a run, powerstat 
will calculate the average, standard deviation and min/max of the gathered data.
+confinement: strict
+type: app
+grade: stable
+
+parts:
+    powerstat:
+        plugin: make
+        source: git://kernel.ubuntu.com/cking/powerstat
+        build-packages:
+            - gcc
+            - make
+
+apps:
+    powerstat:
+        command: usr/bin/powerstat
+        plugs: [hardware-observe,netlink-connector,system-observe]
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerstat-0.02.17/snapcraft/Makefile 
new/powerstat-0.02.18/snapcraft/Makefile
--- old/powerstat-0.02.17/snapcraft/Makefile    2018-05-29 14:05:46.000000000 
+0200
+++ new/powerstat-0.02.18/snapcraft/Makefile    1970-01-01 01:00:00.000000000 
+0100
@@ -1,18 +0,0 @@
-VERSION=$(shell git tag | tail -1 | cut -c2-)
-COMMITS=$(shell git log --oneline | wc -l)
-SHA=$(shell git log -1 --oneline | cut -d' ' -f1)
-DATE=$(shell date +'%Y%m%d')
-V=$(VERSION)-$(DATE)-$(COMMITS)-$(SHA)
-
-all: set_version
-       snapcraft
-
-set_version:
-       cat snapcraft.yaml | sed 's/version: .*/version: $(V)/' > 
snapcraft-tmp.yaml
-       mv snapcraft-tmp.yaml snapcraft.yaml
-
-clean:
-       rm -rf setup *.snap
-       snapcraft clean
-       cat snapcraft.yaml | sed 's/version: .*/version: 0/' > 
snapcraft-tmp.yaml
-       mv snapcraft-tmp.yaml snapcraft.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerstat-0.02.17/snapcraft/snapcraft.yaml 
new/powerstat-0.02.18/snapcraft/snapcraft.yaml
--- old/powerstat-0.02.17/snapcraft/snapcraft.yaml      2018-05-29 
14:05:46.000000000 +0200
+++ new/powerstat-0.02.18/snapcraft/snapcraft.yaml      1970-01-01 
01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-name: powerstat
-version: 0.02.16-20180521-322-c35510c
-summary: computer power measuring tool
-description: Powerstat measures the power consumption of a computer that has a 
battery power source or an Intel RAPL power domain.  The output is like vmstat 
but also shows power consumption statistics.  At the end of a run, powerstat 
will calculate the average, standard deviation and min/max of the gathered data.
-confinement: strict
-type: app
-grade: stable
-
-parts:
-    powerstat:
-        plugin: make
-        source: git://kernel.ubuntu.com/cking/powerstat
-        build-packages:
-            - gcc
-            - make
-
-apps:
-    powerstat:
-        command: usr/bin/powerstat
-        plugs: [hardware-observe,netlink-connector,system-observe]
-


Reply via email to