[PATCH][LNT] Fix bug in linear regressions on linear version numbers

Chris Matthews chris.matthews at apple.com
Fri Aug 9 15:48:11 PDT 2013


Sorry, I forgot to add patch in the subject!

Chris Matthews
chris.matthews at apple.com

On Aug 9, 2013, at 3:46 PM, Chris Matthews <chris.matthews at apple.com> wrote:

> Fix a bug (which I introduced) in handling of linear regressions on linear version numbers.  This resolves the “unsupported operand type(s) for -: ‘tuple’ and ‘tuple’” server error when rendering linear regressions.
> 
> --- a/lnt/server/ui/views.py
> +++ b/lnt/server/ui/views.py
> @@ -547,10 +547,11 @@ def v4_graph():
>              dates = [data_date[1] for data_date in datapoints]
>  
>              metadata = {"label":point_label}
> -            # on simple revisions use rev number for x else start from
> -            # 0
> +            
> +            # When we can, map x-axis to revisions, but when that is too hard
> +            # use the position of the sample instead.
>              rev_x = convert_revision(point_label)
> -            x = rev_x if len(rev_x)==1 else pos
> +            x = rev_x[0] if len(rev_x)==1 else pos
>  
>              values = [v*normalize_by for v in data]
>              min_index,min_value = min(enumerate(values))
> <linear_fix.patch>
> 
> Chris Matthews
> chris.matthews at apple.com
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130809/ac8dcfd0/attachment.html>


More information about the llvm-commits mailing list