From: Junio C Hamano <gitster@pobox.com>
To: Beat Bolli <dev+git@drbeat.li>
Cc: git@vger.kernel.org, Jeff Hostetler <jeffhost@microsoft.com>,
Neeraj Singh <neerajsi@microsoft.com>,
Calvin Wan <calvinwan@google.com>, Victoria Dye <vdye@github.com>
Subject: Re: [PATCH v2 2/2] wrapper: use trace2 counters to collect fsync stats
Date: Thu, 20 Jul 2023 12:26:44 -0700 [thread overview]
Message-ID: <xmqq5y6e2xl7.fsf@gitster.g> (raw)
In-Reply-To: 20230720164823.625815-1-dev+git@drbeat.li
Beat Bolli <dev+git@drbeat.li> writes:
> As mentioned in the thread starting at [1], trace2 counters should be
> used to count events instead of ad-hoc static variables.
>
> Convert the two fsync static variables to trace2 counters, reducing the
> coupling between wrapper.c and the trace2 subsystem. Adjust t/t5351 to
> match the trace2 counter output format.
>
> The counters are not per-thread because the ones being replaced also
> were not.
>
> [1] https://lore.kernel.org/git/20230627195251.1973421-2-calvinwan@google.com/
>
> Signed-off-by: Beat Bolli <dev+git@drbeat.li>
> ---
> v2:
> - Adjust t/t5351
> - Update commit message
I also spotted this change since v1:
- Rename trace2 counters to use "-" (not "_") as inter-word separators.
Since I do not seem to be able to find any review comments regarding
the variable naming in the v1's thread, let's ask stakeholders.
Are folks involved in the trace2 subsystem (especially Jeff
Hostetler---already CC:ed---who presumably has the most stake in it)
OK with the naming convention of the multi-word variable? This is
the first use of multi-word variable name in tr2_ctr, and thus will
establish whatever convention you guys want to use. I do have a
slight preference of "writeout-only" over "writeout_only" but that
is purely from visual appearance. If there is a desire to keep the
names literally reusable as identifiers in some languages used to
postprocess trace output, or something, that might weigh
differently.
> t/t5351-unpack-large-objects.sh | 6 +++---
> trace2.c | 1 -
> trace2.h | 4 ++++
> trace2/tr2_ctr.c | 10 ++++++++++
> wrapper.c | 19 ++-----------------
> wrapper.h | 5 -----
> 6 files changed, 19 insertions(+), 26 deletions(-)
Very nice to see clean-up patch that reduces the amount of code.
Nicely done.
Thanks, will queue. If folks do not find issues in a few days,
let's merge it to 'next'.
next prev parent reply other threads:[~2023-07-20 19:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 23:24 [PATCH 1/2] trace2: fix a comment Beat Bolli
2023-07-19 23:24 ` [PATCH 2/2] wrapper: use trace2 counters to collect fsync stats Beat Bolli
2023-07-20 0:12 ` Junio C Hamano
2023-07-20 16:48 ` [PATCH v2 " Beat Bolli
2023-07-20 19:26 ` Junio C Hamano [this message]
2023-07-25 19:31 ` Junio C Hamano
2023-07-25 23:03 ` Beat Bolli
2023-08-07 18:25 ` Jeff Hostetler
2023-08-07 18:23 ` Jeff Hostetler
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=xmqq5y6e2xl7.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=calvinwan@google.com \
--cc=dev+git@drbeat.li \
--cc=git@vger.kernel.org \
--cc=jeffhost@microsoft.com \
--cc=neerajsi@microsoft.com \
--cc=vdye@github.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 NNTP newsgroup(s).