[LNT] r239138 - Fix report submission when there are failed tests.

Chris Matthews chris.matthews at apple.com
Fri Jun 5 09:54:13 PDT 2015


Thanks for fixing!  With that assertion I was hoping to flush out all the places where we pass ints and None to the stats routines.  Given the way the routines are written, they produce subtly wrong results in those cases.   I sort of want to switch them to numpy and spicy, but in some informal benchmarking we were much faster (10x) than numpy.  Simplicity seems to win out there.

> On Jun 5, 2015, at 1:43 AM, James Molloy <james.molloy at arm.com> wrote:
> 
> Author: jamesm
> Date: Fri Jun  5 03:43:27 2015
> New Revision: 239138
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=239138&view=rev
> Log:
> Fix report submission when there are failed tests.
> 
> When tests fail, we get a .exec.status field type. This has integer
> type, so calling the stats.* functions will now assert and the
> import will silently fail (because the assert is caught).
> 
> Ensure we bypass the stats.* functions when we have integer data.
> 
> Modified:
>    lnt/trunk/lnt/server/reporting/analysis.py
> 
> Modified: lnt/trunk/lnt/server/reporting/analysis.py
> URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/analysis.py?rev=239138&r1=239137&r2=239138&view=diff
> ==============================================================================
> --- lnt/trunk/lnt/server/reporting/analysis.py (original)
> +++ lnt/trunk/lnt/server/reporting/analysis.py Fri Jun  5 03:43:27 2015
> @@ -77,7 +77,11 @@ class ComparisonResult:
> 
>         # If we have multiple values for this run, use that to estimate the
>         # distribution.
> -        if samples and len(samples) > 1:
> +        #
> +        # We can get integer sample types here - for example if the field is
> +        # .exec.status. Make sure we don't assert by avoiding the stats
> +        # functions in this case.
> +        if samples and len(samples) > 1 and isinstance(samples[0], float):
>             self.stddev = stats.standard_deviation(samples)
>             self.MAD = stats.median_absolute_deviation(samples)
>         else:
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list