qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Ahmed Karaman <ahmedkhaledkaraman@gmail.com>,
	qemu-devel@nongnu.org, aleksandar.qemu.devel@gmail.com,
	philmd@redhat.com, alex.bennee@linaro.org, eblake@redhat.com,
	ldoktor@redhat.com, rth@twiddle.net, ehabkost@redhat.com,
	crosa@redhat.com
Subject: Re: [PATCH 1/9] scripts/performance: Refactor topN_perf.py
Date: Thu, 1 Oct 2020 17:59:21 -0400	[thread overview]
Message-ID: <85440dcc-07cf-b699-98b1-09e1f9b291d5@redhat.com> (raw)
In-Reply-To: <ec6e7528-0281-9bdc-5afc-4b9c8a541f13@redhat.com>

On 10/1/20 4:41 PM, John Snow wrote:
> I realize this review comes well after you are no longer being paid to 
> work on this, so I am offering my time to help polish your patches if 
> you would like.

Actually, I see now that you are adding your name to the MAINTAINERS 
file here, so I suspect you probably rather want to be more involved 
than not.

I cleaned up patch 1/9 provisionally with my own style preferences, but 
it's all just style stuff, and it's mostly things I wouldn't actually 
require you to do (...I went way overboard.)

https://gitlab.com/jsnow/qemu/-/commit/c66a4a6ca8ccc3d406b92796935f92057bf1e48d


What I'd recommend for your cleanup is actually *much* simpler;

Use pylint 2.6.0 and flake8 3.8.3:

 > pip3 install --user pylint==2.6.0 flake8==3.8.3

flake8's default settings should be pretty good, but pylint has a lot of 
warnings you can ignore.

In particular, it's OK to use script-style python (Scripts with a 
#!/usr/bin/env python3, and where you do not use python functions to 
avoid side-effects that occur on 'import'.) In this case, IGNORE any of 
pylint's warnings telling you that you have too many lines, that you 
need to UPPERCASE variable names, etc. It just hurts readability here.

So I'd actually ask that you revise these patches to remove all of the 
UPPERCASE variable names, and then check your code with these:

flake8 topN_perf.py
pylint --disable=invalid-name topN_perf.py

Use your best judgment -- If something seems like it looks worse, it 
probably is. If in doubt, please reach out and ask.

--js



  reply	other threads:[~2020-10-01 22:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 10:40 [PATCH 0/9] GSoC 2020 - TCG Continuous Benchmarking scripts and tools Ahmed Karaman
2020-08-28 10:40 ` [PATCH 1/9] scripts/performance: Refactor topN_perf.py Ahmed Karaman
2020-09-07 20:52   ` Aleksandar Markovic
2020-09-18 20:33   ` Aleksandar Markovic
2020-09-19 11:17     ` Bottleneck problem to merge Python patches Philippe Mathieu-Daudé
2020-09-21 14:49       ` John Snow
2020-09-21 15:54       ` Eduardo Habkost
2020-09-21 17:57       ` Cleber Rosa
2020-10-01 20:41   ` [PATCH 1/9] scripts/performance: Refactor topN_perf.py John Snow
2020-10-01 21:59     ` John Snow [this message]
2020-08-28 10:40 ` [PATCH 2/9] scripts/performance: Refactor topN_callgrind.py Ahmed Karaman
2020-09-07 20:53   ` Aleksandar Markovic
2020-08-28 10:40 ` [PATCH 3/9] scripts/performance: Refactor dissect.py Ahmed Karaman
2020-09-02  8:48   ` Aleksandar Markovic
2020-08-28 10:40 ` [PATCH 4/9] scripts/performance: Add list_fn_callees.py script Ahmed Karaman
2020-08-28 10:40 ` [PATCH 5/9] scripts/performance: Add list_helpers.py script Ahmed Karaman
2020-08-28 10:40 ` [PATCH 6/9] scripts/performance: Add bisect.py script Ahmed Karaman
2020-08-28 10:41 ` [PATCH 7/9] tests/performance: Add nightly tests Ahmed Karaman
2020-09-02  8:36   ` Aleksandar Markovic
2020-09-02 13:26   ` Alex Bennée
2020-09-02 17:29     ` Ahmed Karaman
2020-09-15 16:39     ` Aleksandar Markovic
2020-09-16  8:31       ` Alex Bennée
2020-08-28 10:41 ` [PATCH 8/9] MAINTAINERS: Add 'tests/performance' to 'Performance Tools and Tests' subsection Ahmed Karaman
2020-09-02  8:37   ` Aleksandar Markovic
2020-08-28 10:41 ` [PATCH 9/9] scripts/performance: Add topN_system.py script Ahmed Karaman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85440dcc-07cf-b699-98b1-09e1f9b291d5@redhat.com \
    --to=jsnow@redhat.com \
    --cc=ahmedkhaledkaraman@gmail.com \
    --cc=aleksandar.qemu.devel@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=crosa@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=ldoktor@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).