git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/5] Add a little script to compare two make perf runs

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Jul 6, 2014, 16:12 UTC
Message-ID
<CAKPyHN3rz+TUkcpAS3151XZo+zK2Un=LOrQ_A=TVo4QQ_EUsDg@mail.gmail.com>
In-Reply-To
<1404517432-25185-6-git-send-email-andi@firstfloor.org>
Hi,
On Sat, Jul 5, 2014 at 1:43 AM, Andi Kleen <andi@firstfloor.org> wrote:
Show 40 quoted lines
> From: Andi Kleen <ak@linux.intel.com>
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  diff-res | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100755 diff-res
>
> diff --git a/diff-res b/diff-res
> new file mode 100755
> index 0000000..90d57be
> --- /dev/null
> +++ b/diff-res
> @@ -0,0 +1,26 @@
> +#!/usr/bin/python
> +# compare two make perf output file
> +# this should be the results only without any header
> +import argparse
> +import math, operator
> +from collections import OrderedDict
> +
> +ap = argparse.ArgumentParser()
> +ap.add_argument('file1', type=argparse.FileType('r'))
> +ap.add_argument('file2', type=argparse.FileType('r'))
> +args = ap.parse_args()
> +
> +cmp = (OrderedDict(), OrderedDict())
> +for f, k in zip((args.file1, args.file2), cmp):
> +    for j in f:
> +        num = j[59:63]
> +        name = j[:59]
> +        k[name] = float(num)
> +
> +for j in cmp[0].keys():
> +    print j, cmp[1][j] - cmp[0][j]
> +
> +def geomean(l):
> +   return math.pow(reduce(operator.mul, filter(lambda x: x != 0.0, l)), 1.0 / len(l))
> +
> +print "geomean %.2f -> %.2f" % (geomean(cmp[0].values()), geomean(cmp[1].values()))

a justification why the geometric mean is used here would increase my confident significantly.

It calculates wrong values anyway iff there are zeros in the sampling set.
Thanks.
Bert
Previous: Andi KleenNext: Andi Kleen
Message 9 of 11 in “Fix the bitrotted profile feedback build”
  1. Andi KleenJul 4, 2014
  2. 1/5 Use BASIC_FLAGS for profile feedbackAndi Kleen, Jul 4, 2014
  3. 2/5 Don't define away __attribute__ on gccAndi Kleen, Jul 4, 2014
  4. 3/5 Run the perf test suite for profile feedback tooAndi Kleen, Jul 4, 2014
  5. Junio C HamanoJul 7, 2014
  6. Andi KleenJul 7, 2014
  7. 4/5 Fix profile feedback with -jN and add profile-fastAndi Kleen, Jul 4, 2014
  8. 5/5 Add a little script to compare two make perf runsAndi Kleen, Jul 4, 2014
  9. Bert WesargJul 6, 2014
  10. Andi KleenJul 6, 2014
  11. Bert WesargJul 6, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.