Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uxRBr-00EJmQ-LW for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Sep 2025 14:25:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uxRBo-00607R-8o for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Sep 2025 14:25:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uxRBn-00607J-CX for pgsql-hackers@lists.postgresql.org; Sat, 13 Sep 2025 14:25:20 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uxRBj-000bN2-0A for pgsql-hackers@lists.postgresql.org; Sat, 13 Sep 2025 14:25:19 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5BFF97A0096; Sat, 13 Sep 2025 10:25:14 -0400 (EDT) Received: from phl-imap-03 ([10.202.2.93]) by phl-compute-02.internal (MEProxy); Sat, 13 Sep 2025 10:25:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burd.me; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1757773514; x=1757859914; bh=TsoaAUQVRY Z5EZcvN8Y20xjOlfqcrCFN1kk1NlJIjAc=; b=bRiCFbcolRPCGsk8EDEjfSbgzf SiS37/1XeKtzlPrKk1dHTMR67hZGo6wo1L5IapKJu/3gsT1zBq9qERjHMXlZIQww 1kMOfo/2KVVEg4dTi1+8p+fKSGAxG0aga5eI74LQgkNIiKBpzuUXVtf84jAKci2V 6g/O/ofzL2F03ARU0CHID1Xz5BdXDlWuGTII1OIf+x4mvUCh6DIes6QS4qh5huFG O+AQM1klO9qRAaZfc/yt0DqcDs4fRtuGR5TLndKiU8ZTquUKWFELMCvvYo3+I+bS 9ZQIHlbx3gMNgrazL/zJrh1u7sl6PC5vP/j3kdss0ajadkcUQ7s5eO22eTsg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1757773514; x=1757859914; bh=TsoaAUQVRYZ5EZcvN8Y20xjOlfqcrCFN1kk 1NlJIjAc=; b=abxstMaI0LqZtyQmi/B4o29EID0Yvuvn7v1QpwJ2YjLyIPafG9v Rzen40vzpcu8xB3y1BuDONcKBLtm5Ou5Sa8ZNWtk0R1Biot+kxYJ2sQ3yGB6nML0 Kp36jr/xCH3weg5CUZDrK1SyLbQg/fMUZ/Ah7SV4mxQahZ1qls1vQKQbjPfZb9Gc hYNJ7VQtHj5BD26V1yJ85T9KKP+KAtWKNJ9snN4cUe7mxIxhW1m6GNMUS0hrMUcI xWOe//w/xuIzQu1VealGXRMkADvYw9hrm51nF9vU5SCVT1WfFo/W13g2d0Lmrlgi 1PWzecLohAFkY8/omawss/DSYBkA4OBZ55w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdefvdduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvvefkjghfufgtsegrtdhmreertdejnecuhfhrohhmpedfifhrvghguceu uhhrugdfuceoghhrvghgsegsuhhrugdrmhgvqeenucggtffrrghtthgvrhhnpedtjeeije duheeludfgudefkedtgedugeehvdfhfeekheduudeihfetfedtgfeggfenucffohhmrghi nhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepghhrvghgsegsuhhrugdrmhgvpdhnsggprhgtphhtthho peegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehnrghthhgrnhgusghoshhsrg hrthesghhmrghilhdrtghomhdprhgtphhtthhopehsrgifrggurgdrmhhshhhksehgmhgr ihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrph hoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepmhhitghhrggvlhesphgrqhhuihgv rhdrgiihii X-ME-Proxy: Feedback-ID: i675e48f3:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 9B23C18E0069; Sat, 13 Sep 2025 10:25:13 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: A5CwicshU8vJ Date: Sat, 13 Sep 2025 10:23:36 -0400 From: "Greg Burd" To: "Michael Paquier" , "Masahiko Sawada" Cc: "Nathan Bossart" , "PostgreSQL Hackers" Message-Id: <20200C9C-8DA3-413F-AE9A-60D6761DD060@burd.me> In-Reply-To: References: <7BD1ABDB-B03A-464A-9BA9-A73B55AD8A1F@getmailspring.com> <02DB5E92-1E94-4617-AC11-836486F63BD5@burd.me> <9E1E0BA4-952C-412A-884A-6E700F26B0CA@burd.me> <0978d5ba-e015-4889-a8b7-7a2891664492@app.fastmail.com> Subject: Re: [PATCH] Add tests for Bitmapset Content-Type: multipart/alternative; boundary=a7dc806e6f014461b86faaf2c7ded1a1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --a7dc806e6f014461b86faaf2c7ded1a1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On Sep 11, 2025, at 9:36=E2=80=AFPM, Michael Paquier wrote: >=20 > On Thu, Sep 11, 2025 at 06:56:07AM -0400, Greg Burd wrote: >> Just for reference I started this not to increase coverage, which is = a good >> goal just not the one I had. I was reviewing the API and considering= some >> changes based on other work I've done. Now that I see how deeply bak= ed in >> this code is I think that's unlikely. Maybe something else distinct = for >> bitmaps over 64-bit space at some point will be useful. I wrote this= code >> just to capture the API in test form. >=20 > How much does this measure in terms of numbers produced by > coverage-html (see [1])? The paths taken don't always matter as it > can also be important to check combinations of code paths that are > taken by other tests when checking after edge cases, but that would > give an idea of gain vs extra runtime. Not objecting to your patch, > just being curious as I am not seeing any numbers posted on this > thread. >=20 > [1]: https://www.postgresql.org/docs/devel/regress-coverage.html > -- > Michael Sawada-san, Michael, Thank you both for the push to measure. Before the patch as it stands n= ow the coverage for src/backend/nodes/bitmapset.c is 63.5% and after it is 66.5= %. Not an amazing difference, but something. I guess I expected this to be hig= her given the degree to which this datatype is used. I'll review the gaps in coverage and update the tests. I'll look for a = way to add meaningful randomization. -greg --a7dc806e6f014461b86faaf2c7ded1a1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

On Sep 11, 2025, at 9:36=E2=80=AFPM, Michae= l Paquier <michael@paquier.xyz> wrote:

On= Thu, Sep 11, 2025 at 06:56:07AM -0400, Greg Burd wrote:
Just for reference I started this not to increase c= overage, which is a good
goal just not the one I had.  I = was reviewing the API and considering some
changes based on ot= her work I've done.  Now that I see how deeply baked in
t= his code is I think that's unlikely.  Maybe something else distinct= for
bitmaps over 64-bit space at some point will be useful. &= nbsp;I wrote this code
just to capture the API in test form.

How much does this measure in terms= of numbers produced by
coverage-html (see [1])?  The pat= hs taken don't always matter as it
can also be important to ch= eck combinations of code paths that are
taken by other tests w= hen checking after edge cases, but that would
give an idea of = gain vs extra runtime.  Not objecting to your patch,
just= being curious as I am not seeing any numbers posted on this
t= hread.

[1]: https://www.postgresql.org/docs/dev= el/regress-coverage.html
--
Michael


Sawada-san, Michael,

=
Thank you both for the push to measure.  Before the patc= h as it stands now the
coverage for src/backend/nodes/bitmapse= t.c is 63.5% and after it is 66.5%.  Not
an amazing diffe= rence, but something.  I guess I expected this to be higher given
the degree to which this datatype is used.

=
I'll review the gaps in coverage and update the tests.  I'll l= ook for a way to add
meaningful randomization.

<= /div>
-greg
--a7dc806e6f014461b86faaf2c7ded1a1--