public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Noah Sanci <nsanci@redhat.com>, elfutils-devel@sourceware.org
Subject: Re: [Bug debuginfod/27277] Describe retrieved files when verbose
Date: Mon, 09 Aug 2021 11:25:15 +0200	[thread overview]
Message-ID: <9ac621fee207ef233873c40843b3d34ced9019cc.camel@klomp.org> (raw)
In-Reply-To: <20210806185459.GE4195@redhat.com>

Hi Frank,

On Fri, 2021-08-06 at 14:54 -0400, Frank Ch. Eigler wrote:
> > Yes, since the actual download might take a bit, it is nice to see
> > the
> > headers at the moment we commit to a server/download. aka here in
> > the
> > source:
> > 
> >   if (vfd >= 0 && !verbose_reported && committed_to >= 0)
> >     {
> >       bool pnl = (c->default_progressfn_printed_p && vfd ==
> > STDERR_FILENO);
> >       dprintf (vfd, "%scommitted to url %d\n", pnl ? "\n" : "",
> >                committed_to);
> >       if (pnl)
> >         c->default_progressfn_printed_p = 0;
> >       verbose_reported = true;
> >     }
> 
> One could print it there, but verbose printing is so voluminous and
> unstructured that mingling http headers there can only be for a
> masochist human's consumption.

But the verbose output up to now is also chronological. I would expect
the headers to be shown before seeing verbose traces of other activity.

> > Yes, I do think there is something there, but imho it is too vague
> > and
> > fragile to be useful as is, especially since it depends on what is
> > in the cache.
> 
> I believe you mean that these headers would only be available for
> files fetched anew, not for queries previously cached.  Yeah.  A
> person or tool can force a new fetch by using something like
> DEBUGINFOD_CACHE_PATH=`mktemp -d`.

Which IMHO is not a great interface, especially if it forces a full new
download.

> That in turn would require THREE new API functions or a stateful
> > > set_HEAD_mode_and_return_dev_null one and modifying the three
> > > main
> > > lookup functions.
> > 
> > Yes, it definitely is more work.
> 
> So, is that your suggestion?  We proceed with that sort of thing?

Yes, separate the verbose printing of http headers (which I really do
like) from providing an interface to query what needs to be done to get
some file (is it in cache, can it be retieved from a remote server, how
big is it?) I don't think providing raw http headers is that interface.

Cheers,

Mark


  reply	other threads:[~2021-08-09  9:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 18:54 Noah Sanci
2021-08-05 15:13 ` Mark Wielaard
2021-08-05 16:54   ` Frank Ch. Eigler
2021-08-06 10:04     ` Mark Wielaard
2021-08-06 18:54       ` Frank Ch. Eigler
2021-08-09  9:25         ` Mark Wielaard [this message]
2021-08-23 15:11           ` Noah Sanci
2021-08-24  8:18             ` Mark Wielaard
2021-08-27 18:38               ` Noah Sanci
2021-09-08 20:56                 ` Mark Wielaard
2021-09-10 18:22                   ` Noah Sanci
2021-09-12 19:08                     ` Mark Wielaard
2021-09-13 20:07                       ` Noah Sanci
2021-09-16 10:50                         ` Mark Wielaard
2021-09-22 20:33           ` Frank Ch. Eigler
2021-09-29 14:55             ` Mark Wielaard
2021-09-29 21:28               ` Frank Ch. Eigler
2021-10-05 14:28                 ` Mark Wielaard
2022-07-14 15:32                   ` Noah Sanci
2022-08-04 13:12                     ` Mark Wielaard
     [not found]                       ` <CAJXA7qg09YkxK-NRQ31Hem0+54Us=jYC5+1siPSbHangx=SCow@mail.gmail.com>
2022-08-08 14:35                         ` Mark Wielaard
2021-08-25 18:08 Noah Sanci
2021-09-08 15:01 ` Mark Wielaard

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=9ac621fee207ef233873c40843b3d34ced9019cc.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@redhat.com \
    --cc=nsanci@redhat.com \
    /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).