]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
benchtests: Set float type on --threshold argument
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Thu, 4 Oct 2018 21:40:36 +0000 (16:40 -0500)
committerLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Mon, 8 Oct 2018 14:11:30 +0000 (09:11 -0500)
Otherwise, we see the following runtime error when using the parameter:

  File "./glibc/benchtests/scripts/compare_bench.py", line 46, in do_compare
    if d > threshold:
TypeError: '>' not supported between instances of 'float' and 'str'

* benchtests/scripts/compare_bench.py (main): set float type on
threshold argument.

ChangeLog
benchtests/scripts/compare_bench.py

index 70782a6dd5b9e832f07af73363fee85915fc9e16..af0f15b468eefa0dd8f0451d4f02900711559ef9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-08  Leonardo Sandoval  <leonardo.sandoval.gonzalez@intel.com>
+
+       * benchtests/scripts/compare_bench.py (main): set float type on
+       threshold argument.
+
 2018-10-08  Rafal Luzynski  <digitalfreak@lingonborough.com>
 
        [BZ #23740]
index 88e8911d812f463aeadd041f29ab8b7cbedd7e89..f4b7742f90338e02235363cb955781765e6840ed 100755 (executable)
@@ -175,7 +175,7 @@ if __name__ == '__main__':
     parser.add_argument('--schema',
                         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, help='Only print those with equal or higher threshold (default: %(default)s)')
+    parser.add_argument('--threshold', default=10.0, type=float, help='Only print those with equal or higher threshold (default: %(default)s)')
 
     args = parser.parse_args()