public inbox for bunsen@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Serhei Makarov <me@serhei.io>
Cc: bunsen@sourceware.org
Subject: Re: Initial findings of bunsen performance and questions
Date: Fri, 18 Sep 2020 09:16:25 -0700	[thread overview]
Message-ID: <9709c97e-bb12-48dd-2c5c-a9efb35e55d1@redhat.com> (raw)
In-Reply-To: <ae67ec10-d36b-498d-bbef-cc49c1503dbd@www.fastmail.com>

On 9/16/20 4:09 PM, Serhei Makarov wrote:

> On Wed, Sep 16, 2020, at 6:18 PM, Keith Seitz via Bunsen wrote:
>> The first question to ask is: Is this an oversimplified/naive implementation
>> of this script?
> It looks right to me. I briefly suspected the lambda might do some additional
> object copying, but that doesn't seem to be the case.

I profiled the code at one time to ascertain where all the time was being
spent. I don't have the specific results handy, but IIRC, most of the time
was being spent in Testrun.__init__, specifically:

            for field in defer_fields:
                self[field] = self._deserialize_testrun_field(field, self[field],
                                                              cursor_commit_ids)


> I suspect my code for building the repo has some bug when using consolidate_pass=False.
> Could you place the Git/JSON repo you built somewhere I have access to?

Yes, I will send you (privately) what I've been benchmarking. This is nearly unaltered
bunsen repo, but I've added a few simple patches to fix some existing problems.

> (Also, you could try the +diff_runs script on your repo. If the JSON
> parsing is the source of the slowdown and reading one run took 20s, 
> logically reading two runs would take you 40s.)

That is exactly what happens:

$ time ./bunsen.py +diff_runs 42563db d2a72bd
...
real    0m57.300s
user    0m49.599s
sys     0m17.683s

> IMO the comparison has to be done with 100s to 1000s of similar test runs
> since Git's de-duplication must be compared to whatever SQLite does,
> at that scale of data.
> I doubt it's important though, for this use case we have disk space to burn
> and the query speedup even justifies keeping both forms of storage.

Indeed -- the sample space is too small, but I just wanted to get a feeling of
how this is going.

>> Is this an approach that seems viable as a supplement (replacement?)
>> to JSON output? Is this approach something worth pursuing?
> Definitely worth pursuing due to the aforementioned possibility of 'column queries'
> which I don't see any way of handling well with the design I currently have.
> 
> I'm not sure if SQLite is better used as a replacement for the JSON/Git storage
> or as a supplemental cache built from it and used to speed up queries.
> (Also, the original log files must be retained in any case.)

All my current proof-of-concept does is replace the *test* data .JSON -> .db.
So there are still JSON files that are used to describe the Testrun metadata, e.g.
I haven't attempted to change that since I haven't fully investigated it.

Right now, my plan is to make this an optional/configurable option. It really
only needs to be configured when data is imported. We should be able to otherwise
handle this transparently behind the scenes.

So I will just continue on my way and try to get something review-ready.

Thank you for your input!

Keith


  reply	other threads:[~2020-09-18 16:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 22:18 Keith Seitz
2020-09-16 23:09 ` Serhei Makarov
2020-09-18 16:16   ` Keith Seitz [this message]
2020-09-21 20:08     ` Serhei Makarov
2020-09-21 20:16       ` Keith Seitz

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=9709c97e-bb12-48dd-2c5c-a9efb35e55d1@redhat.com \
    --to=keiths@redhat.com \
    --cc=bunsen@sourceware.org \
    --cc=me@serhei.io \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).