Benchm...essBar(3pm)

πŸ“¦
version 0.00001 Β· 2 versions
  • 0.00001 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.00001 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Benchmark::ProgressBar πŸ’–

okay bestie, so this is Benchmark::ProgressBar β€” a Perl module from User Contributed Perl Documentation that literally exists so you can watch your benchmark run instead of just sitting there like 🧍 waiting with zero clue when it'll be done. it's the manual page Benchm...essBar(3pm) btw, if you were wondering where you even are rn.


✨ SYNOPSIS ✨

use Benchmark::ProgressBar qw(cmpthese);

cmpthese(10_000, {
  a => sub { ... },
  b => sub { ... },
} );

that's it. that's the whole vibe. πŸŽ€


🌸 DESCRIPTION 🌸

so like. this module is a VERY crude combo of Benchmark.pm and Term::ProgressBar. that's the whole concept fr fr. basically the author got sick and tired 😭 of waiting for benchmarks to finish up with absolutely no idea what the ETA was β€” and honestly? relatable. iconic behavior. we love a problem-solving queen. πŸ‘‘

here's the tea: you can use it as a drop-in replacement for Benchmark.pm 🫢 β€” but heads up, the only functions that will actually display a progress bar are these three:

  • cmpthese
  • timethese
  • timeit

so don't come for it expecting every single function to give you the cute little bar. it's giving selective service, not full coverage. πŸ’…

now the ✨how✨ β€” and bestie, brace yourself β€” this is achieved via a crude (a VERY crude) re-definition of Benchmark.pm's subroutines. yeah. that's the mechanism. it's lowkey unhinged but it works.

⚠️ and because of that re-definition situation, you should not be mixing this with Benchmark.pm. like, don't. the author literally says "I don't know why you would" and honestly? same. πŸ’€

final thoughts from the source, verbatim energy: it does the job for the author, YMMV πŸ™ˆ, and patches are welcome! so if you've got something to contribute, the door is open, bestie. πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Copyright (c) 2008 Daisuke Maki "daisuke@endeworks.jp"

(put some respect on the name, they built this for us 🌈)


πŸŽ€ LICENSE πŸŽ€

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html


and that's the page, bestie!! ✨ this one came from perl v5.34.0, dated 2022-06-08, filed under Benchm...essBar(3pm) β€” go forth and watch those progress bars fill up, you absolute main character πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from