This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.28.9000-387-gde09975


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  de099757b693c2809527f7df7d64b70942177d97 (commit)
       via  1990185f5ff5a77f07ced4408cd0e5c4de404ad7 (commit)
       via  587426d499e6ac40dafd9a19dcd12cb6af93f5fc (commit)
      from  46703efa02f6ddebce5ee54c92f7c32598de0de6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de099757b693c2809527f7df7d64b70942177d97

commit de099757b693c2809527f7df7d64b70942177d97
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Date:   Mon Dec 10 15:20:23 2018 -0600

    benchtests: send non-consumable data to stderr
    
    Non-consumable data, alias data not related to benchmarks, should be sent to
    the standard error, thus pipelines can work as expected.
    
    	* benchtests/scripts/compare_bench.py (do_compare): write to stderr in case
        stat is not present.
    	* benchtests/scripts/compare_bench.py (plot_graphs): write to stderr in case
        timings field is not present. Also string showing the output filename goes
        into the stderr.

diff --git a/ChangeLog b/ChangeLog
index 953a047..1b0fff4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2018-12-12  Leonardo Sandoval  <leonardo.sandoval.gonzalez@intel.com>
 
+	* benchtests/scripts/compare_bench.py (do_compare): write to
+	stderr in casestat is not present.
+	* benchtests/scripts/compare_bench.py (plot_graphs): write to
+	stderr in case timings field is not present. Also string showing
+	the output filename goes into the stderr.
+
+2018-12-12  Leonardo Sandoval  <leonardo.sandoval.gonzalez@intel.com>
+
 	* benchtests/scripts/compare_bench.py (do_compare): Catch KeyError
 	and ZeroDivisorError exceptions.
 	* benchtests/scripts/compare_bench.py (compare_runs): Use stats
diff --git a/benchtests/scripts/compare_bench.py b/benchtests/scripts/compare_bench.py
index f0c9bf7..eaddc57 100755
--- a/benchtests/scripts/compare_bench.py
+++ b/benchtests/scripts/compare_bench.py
@@ -47,6 +47,7 @@ def do_compare(func, var, tl1, tl2, par, threshold):
         v2 = tl2[str(par)]
         d = abs(v2 - v1) * 100 / v1
     except KeyError:
+        sys.stderr.write('%s(%s)[%s]: stat does not exist\n' % (func, var, par))
         return
     except ZeroDivisionError:
         return
@@ -85,7 +86,7 @@ def compare_runs(pts1, pts2, threshold, stats):
             # timing info for the function variant.
             if 'timings' not in pts1['functions'][func][var].keys() or \
                 'timings' not in pts2['functions'][func][var].keys():
-                    continue
+                continue
 
             # If two lists do not have the same length then it is likely that
             # the performance characteristics of the function have changed.
@@ -133,7 +134,7 @@ def plot_graphs(bench1, bench2):
             # No point trying to print a graph if there are no detailed
             # timings.
             if u'timings' not in bench1['functions'][func][var].keys():
-                print('Skipping graph for %s(%s)' % (func, var))
+                sys.stderr.write('Skipping graph for %s(%s)\n' % (func, var))
                 continue
 
             pylab.clf()
@@ -157,7 +158,7 @@ def plot_graphs(bench1, bench2):
                 filename = "%s-%s.png" % (func, var)
             else:
                 filename = "%s.png" % func
-            print('Writing out %s' % filename)
+            sys.stderr.write('Writing out %s' % filename)
             pylab.savefig(filename)
 
 def main(bench1, bench2, schema, threshold, stats):

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1990185f5ff5a77f07ced4408cd0e5c4de404ad7

commit 1990185f5ff5a77f07ced4408cd0e5c4de404ad7
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Date:   Mon Dec 10 15:15:34 2018 -0600

    benchtests: include --stats parameter
    
    Allows user to pick a statistic, defaulting to min and mean, from command
    line. At the same time, if stat does not exit, catch the run-time exception
    and keep comparing the rest of benchmarked functions. Finally, take care of
    division-by-zero exceptions and as the latter, keep comparing the rest of the
    functions, turning the script a bit more fault tolerant thus useful.
    
    	* benchtests/scripts/compare_bench.py (do_compare): Catch KeyError and
        ZeroDivisorError exceptions.
    	* benchtests/scripts/compare_bench.py (compare_runs): Use stats argument to
        loop through user provided statistics.
    	* benchtests/scripts/compare_bench.py (main): Include the --stats argument.

diff --git a/ChangeLog b/ChangeLog
index 18b9f37..953a047 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2018-12-12  Leonardo Sandoval  <leonardo.sandoval.gonzalez@intel.com>
 
+	* benchtests/scripts/compare_bench.py (do_compare): Catch KeyError
+	and ZeroDivisorError exceptions.
+	* benchtests/scripts/compare_bench.py (compare_runs): Use stats
+	argument to loop through user provided statistics.
+	* benchtests/scripts/compare_bench.py (main): Include the --stats
+	argument.
+
+2018-12-12  Leonardo Sandoval  <leonardo.sandoval.gonzalez@intel.com>
+
 	* benchtests/scripts/compare_bench.py (compare_runs): Continue
 	instead of return.
 
diff --git a/benchtests/scripts/compare_bench.py b/benchtests/scripts/compare_bench.py
index 9cbbda6..f0c9bf7 100755
--- a/benchtests/scripts/compare_bench.py
+++ b/benchtests/scripts/compare_bench.py
@@ -42,17 +42,25 @@ def do_compare(func, var, tl1, tl2, par, threshold):
         threshold: The threshold for differences, beyond which the script should
         print a warning.
     """
-    d = abs(tl2[par] - tl1[par]) * 100 / tl1[str(par)]
+    try:
+        v1 = tl1[str(par)]
+        v2 = tl2[str(par)]
+        d = abs(v2 - v1) * 100 / v1
+    except KeyError:
+        return
+    except ZeroDivisionError:
+        return
+
     if d > threshold:
-        if tl1[par] > tl2[par]:
+        if v1 > v2:
             ind = '+++'
         else:
             ind = '---'
         print('%s %s(%s)[%s]: (%.2lf%%) from %g to %g' %
-                (ind, func, var, par, d, tl1[par], tl2[par]))
+                (ind, func, var, par, d, v1, v2))
 
 
-def compare_runs(pts1, pts2, threshold):
+def compare_runs(pts1, pts2, threshold, stats):
     """Compare two benchmark runs
 
     Args:
@@ -70,8 +78,8 @@ def compare_runs(pts1, pts2, threshold):
 
             # Compare the consolidated numbers
             # do_compare(func, var, tl1, tl2, 'max', threshold)
-            do_compare(func, var, tl1, tl2, 'min', threshold)
-            do_compare(func, var, tl1, tl2, 'mean', threshold)
+            for stat in stats.split():
+                do_compare(func, var, tl1, tl2, stat, threshold)
 
             # Skip over to the next variant or function if there is no detailed
             # timing info for the function variant.
@@ -152,7 +160,7 @@ def plot_graphs(bench1, bench2):
             print('Writing out %s' % filename)
             pylab.savefig(filename)
 
-def main(bench1, bench2, schema, threshold):
+def main(bench1, bench2, schema, threshold, stats):
     bench1 = bench.parse_bench(bench1, schema)
     bench2 = bench.parse_bench(bench2, schema)
 
@@ -161,7 +169,7 @@ def main(bench1, bench2, schema, threshold):
     bench.compress_timings(bench1)
     bench.compress_timings(bench2)
 
-    compare_runs(bench1, bench2, threshold)
+    compare_runs(bench1, bench2, threshold, stats)
 
 
 if __name__ == '__main__':
@@ -176,7 +184,8 @@ if __name__ == '__main__':
                         default=os.path.join(os.path.dirname(os.path.realpath(__file__)),'benchout.schema.json'),
                         help='JSON file to validate source/dest files (default: %(default)s)')
     parser.add_argument('--threshold', default=10.0, type=float, help='Only print those with equal or higher threshold (default: %(default)s)')
+    parser.add_argument('--stats', default='min mean', type=str, help='Only consider values from the statistics specified as a space separated list (default: %(default)s)')
 
     args = parser.parse_args()
 
-    main(args.bench1, args.bench2, args.schema, args.threshold)
+    main(args.bench1, args.bench2, args.schema, args.threshold, args.stats)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=587426d499e6ac40dafd9a19dcd12cb6af93f5fc

commit 587426d499e6ac40dafd9a19dcd12cb6af93f5fc
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Date:   Mon Dec 10 14:52:23 2018 -0600

    benchtests: keep comparing even if function timings do not match
    
    Allows other functions to be processed, making the script a bit more fault
    tolerant thus useful.
    
    	* benchtests/scripts/compare_bench.py (compare_runs): Continue instead of return.

diff --git a/ChangeLog b/ChangeLog
index f85b3f5..18b9f37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-12  Leonardo Sandoval  <leonardo.sandoval.gonzalez@intel.com>
+
+	* benchtests/scripts/compare_bench.py (compare_runs): Continue
+	instead of return.
+
 2018-12-12  Florian Weimer  <fweimer@redhat.com>
 
 	* sysdeps/posix/timespec_get.c: Add missing â??any later versionâ??
diff --git a/benchtests/scripts/compare_bench.py b/benchtests/scripts/compare_bench.py
index f4b7742..9cbbda6 100755
--- a/benchtests/scripts/compare_bench.py
+++ b/benchtests/scripts/compare_bench.py
@@ -77,7 +77,7 @@ def compare_runs(pts1, pts2, threshold):
             # timing info for the function variant.
             if 'timings' not in pts1['functions'][func][var].keys() or \
                 'timings' not in pts2['functions'][func][var].keys():
-                    return
+                    continue
 
             # If two lists do not have the same length then it is likely that
             # the performance characteristics of the function have changed.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |   22 ++++++++++++++++++++++
 benchtests/scripts/compare_bench.py |   34 ++++++++++++++++++++++------------
 2 files changed, 44 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]