From: Stephen Hemminger <stephen@networkplumber.org>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: dev@dpdk.org, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH] mempool: introduce statistics reset function
Date: Mon, 23 Feb 2026 09:21:02 -0800 [thread overview]
Message-ID: <20260223092102.20446fa4@phoenix.local> (raw)
In-Reply-To: <20260223102054.336350-1-mb@smartsharesystems.com>
On Mon, 23 Feb 2026 10:20:54 +0000
Morten Brørup <mb@smartsharesystems.com> wrote:
> + fprintf(f, " avg objs/bulk put=%#Lf, get=%#Lf, get_fail=%#Lf\n",
> + sum.put_bulk != 0 ? (long double)sum.put_objs / sum.put_bulk : 0,
> + sum.get_success_bulk != 0 ?
> + (long double)sum.get_success_objs / sum.get_success_bulk : 0,
> + sum.get_fail_bulk != 0 ?
> + (long double)sum.get_fail_objs / sum.get_fail_bulk : 0);
> + fprintf(f, " avg common_pool objs/bulk put=%#Lf, get=%#Lf\n",
> + sum.put_common_pool_bulk != 0 ?
> + (long double)sum.put_common_pool_objs / sum.put_common_pool_bulk : 0,
> + sum.get_common_pool_bulk != 0 ?
> + (long double)sum.get_common_pool_objs / sum.get_common_pool_bulk : 0);
> + fprintf(f, " avg cache miss rate put_objs=%s%#Lf, get_objs=%s%#Lf\n",
> + sum.put_common_pool_objs != 0 ? "1/" : "",
> + sum.put_common_pool_objs != 0 ?
> + (long double)sum.put_objs / sum.put_common_pool_objs : 0,
> + sum.get_common_pool_objs != 0 ? "1/" : "",
> + sum.get_common_pool_objs != 0 ?
> + (long double)sum.get_success_objs / sum.get_common_pool_objs : 0);
> + fprintf(f, " avg cache miss rate put_bulk=%s%#Lf, get_bulk=%s%#Lf\n",
> + sum.put_common_pool_bulk != 0 ? "1/" : "",
> + sum.put_common_pool_bulk != 0 ?
> + (long double)sum.put_bulk / sum.put_common_pool_bulk : 0,
> + sum.get_common_pool_bulk != 0 ? "1/" : "",
> + sum.get_common_pool_bulk != 0 ?
> + (long double)sum.get_success_bulk / sum.get_common_pool_bulk : 0);
This is getting verbose, would look better as function or better yet table driven.
next prev parent reply other threads:[~2026-02-23 17:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 10:20 [PATCH] mempool: introduce statistics reset function Morten Brørup
2026-02-23 17:21 ` Stephen Hemminger [this message]
2026-02-23 18:14 ` Morten Brørup
2026-02-24 6:29 ` Andrew Rybchenko
2026-02-24 6:38 ` Morten Brørup
2026-02-24 6:50 ` Andrew Rybchenko
2026-02-24 9:28 ` [PATCH v2] " Morten Brørup
2026-02-24 9:57 ` Andrew Rybchenko
2026-02-27 9:20 ` fengchengwen
2026-02-27 21:24 ` Morten Brørup
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=20260223092102.20446fa4@phoenix.local \
--to=stephen@networkplumber.org \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.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