develooper Front page | perl.perl5.porters | Postings from October 2021

Re: leak testing modules [was: [Encode] 3.15 Released]

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
October 11, 2021 20:54
Subject:
Re: leak testing modules [was: [Encode] 3.15 Released]
Message ID:
20211011215424.29eba826@shy.leonerd.org.uk
On Mon, 11 Oct 2021 20:43:09 +0000
Eric Wong <p5p@yhbt.net> wrote:

> Does anybody here have suggestions on how to go about adding
> leak tests to packages like Encode?

I usually use Test::Refcount.

  (Disclaimer: I wrote it)

It asserts that the refcount of a thing is what the test script claims
it to be (often 1). If it fails, it writes a heapdump file you can
analyse using Devel::MAT.

  (Disclaimer: I wrote that too)

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About