BigBench v0.10

2004-08-22 Thread Tels
--Boundary-00=_4qIKBAMkjo+ZGFc
Content-Type: text/plain;
  charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Moin,

this is something that I had a long time sitting on my harddisk. I uploaded 
v0.10 to

http://bloodgate.com/perl/packages/BigBench-0.10.tar.gz

This is a small script that makes benchmarking different module or even Perl 
versions against eachother much easier.

BigBench v0.10  (c) Copyright by Tels 2001-2002.  Have fun!

 Usage  : ./bb [options]
 Options: --help  print this screen and exit
  --accuracy=digits   round results to so many digits
  --base=number   print relative summary based on number
  --code=sourcecode   bench code snippet and ignore definitions
  --definitons=file   from where to read benchmark definitions
  --duration=seconds  run each op for at least this time
  --nosummary don't print summary
  --nointeger don't round results to integer
  --nounlink  don't unlink temporary files (for debug)
  --path=libpath  path to libraries used by templates
  --runs=number   run benchmark more than once (see --take)
  --simulate=sr   simulate results by using srand(sr)
  --skew=factor   scale reported numbers by factor
  --take=run  take lowest|average|highest|last
  --templates=pathpath to templates to be used
  --terse terse summary (unless --nosummary)
  --tight more tight summary (smaller spacing)

 Options may be abbreviated, their case does not matter.

 Examples: ./bb --def=math.def --terse --skew=2.1   # better printable?
   ./bb --def=str.def --inc=math --duration=5   # really 
fine-grained
   ./bb --def=some.def --nosummary  # detailed
   ./bb --def=some.def --terse --base=100   # simulate perlbench
   ./bb --code='ababba =~ /a+/;'  # only this
   ./bb --runs=2 --take=last# cache, then bench

Here is an excerpt from a definition file, specifiying four ops to 
benchmark:

 group=bcmp#0#Big integer bcmp
 0#1 1#$x=$c-new('1');$y=$x-copy();##$x-bcmp($y);
 0#1e10 1e10#$x=$c-new('1'x10);$y=$x-copy();##$x-bcmp($y);
 group=bsqrt#0#Big integer square root
 0#5#$x=$c-new('5');#$x-copy();#$x-copy()-bsqrt();
 0#12#$x=$c-new('12');#$x-copy();#$x-copy()-bsqrt();

The latter two benchmark the copy() seperately from the copy()-bsqrt() to 
determine how much the bsqrt() takes alone. The copy() is neccessary to 
always bench the same bsqrt() operations (it would change $x otherwise).

I also attached two template files that do the actual benchmarking. First 
they make sure that the proper modules are loaded, then setup the opration 
(notable $c because our definition file will use this).

Of course, you can also just benchmark any code snippet:

./bb --code='$a =~ /abc/'

The biggst TODO is currently that it generates the benchmark and then 
displays the result from that in one step. This should be separated so that 
you can generate different outputs without the need to re-run the time 
consuming benchmarks.

If there is sufficient interest, I'll work on that.

I've found that benchmarking different module versions automatically on a 
wide range of ops enablesme to discover bugs - if something is suddenly 2 
times as slow than some subtle change broke something :)

Best wishes,

Tels

--
 Signed on Sun Aug 22 13:42:14 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 Und jetzt kommen Sie! - Stenkelfeld


--Boundary-00=_4qIKBAMkjo+ZGFc
Content-Type: application/x-perl;
  name=v0.01.inc
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=v0.01.inc

#!/usr/bin/perl 

# bigbench template file. This runs the benchmark suite under the original
# code.

$| = 1;
use lib '##path##/Math-BigInt-0.01/lib';
use Math::BigInt;
use Math::BigFloat;
use Benchmark;

# output header and test for correct version

my $need = 'Math::BigInt v0.01';
my $v = Math::BigInt v$Math::BigInt::VERSION;
print $v\n;

die Can not load '$need', got '$v'\n unless $v eq $need;

$cf = 'Math::BigFloat::Bench';
$c = 'Math::BigInt::Bench';

###
package Math::BigInt::Bench;
use Exporter;
@ISA = qw/Exporter Math::BigInt/;

sub copy { Math::BigInt::Bench-new(shift); }


package Math::BigFloat::Bench;
use Exporter;
@ISA = qw/Exporter Math::BigFloat/;

sub copy { Math::BigFloat::Bench-new(shift); }

package main;

my ($x,$y,$z);
# actual benchmarking code will be appended


--Boundary-00=_4qIKBAMkjo+ZGFc
Content-Type: application/x-perl;
  name=v1.72.inc
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;

Re: BigBench v0.10

2004-08-22 Thread Tels
-BEGIN PGP SIGNED MESSAGE-

Moin,

On Sunday 22 August 2004 13:58, Tels wrote:
  Und jetzt kommen Sie! - Stenkelfeld


 - -Boundary-00=_4qIKBAMkjo+ZGFc
 Content-Type: application/x-perl;

Ugh, seems the gnupg signing screwed up the mime containers or something 
like that: I apologize for the garbled post. 

Here is the text again:

Moin,

this is something that I had a long time sitting on my harddisk. I uploaded 
v0.10 to

http://bloodgate.com/perl/packages/BigBench-0.10.tar.gz

This is a small script that makes benchmarking different module or even Perl 
versions against eachother much easier.

BigBench v0.10  (c) Copyright by Tels 2001-2002.  Have fun!

 Usage  : ./bb [options]
 Options: --help  print this screen and exit
  --accuracy=digits   round results to so many digits
  --base=number   print relative summary based on number
  --code=sourcecode   bench code snippet and ignore definitions
  --definitons=file   from where to read benchmark definitions
  --duration=seconds  run each op for at least this time
  --nosummary don't print summary
  --nointeger don't round results to integer
  --nounlink  don't unlink temporary files (for debug)
  --path=libpath  path to libraries used by templates
  --runs=number   run benchmark more than once (see --take)
  --simulate=sr   simulate results by using srand(sr)
  --skew=factor   scale reported numbers by factor
  --take=run  take lowest|average|highest|last
  --templates=pathpath to templates to be used
  --terse terse summary (unless --nosummary)
  --tight more tight summary (smaller spacing)

 Options may be abbreviated, their case does not matter.

 Examples: ./bb --def=math.def --terse --skew=2.1   # better printable?
   ./bb --def=str.def --inc=math --duration=5   # really 
fine-grained
   ./bb --def=some.def --nosummary  # detailed
   ./bb --def=some.def --terse --base=100   # simulate perlbench
   ./bb --code='ababba =~ /a+/;'  # only this
   ./bb --runs=2 --take=last# cache, then bench

Here is an excerpt from a definition file, specifiying four ops to 
benchmark:

 group=bcmp#0#Big integer bcmp
 0#1 1#$x=$c-new('1');$y=$x-copy();##$x-bcmp($y);
 0#1e10 1e10#$x=$c-new('1'x10);$y=$x-copy();##$x-bcmp($y);
 group=bsqrt#0#Big integer square root
 0#5#$x=$c-new('5');#$x-copy();#$x-copy()-bsqrt();
 0#12#$x=$c-new('12');#$x-copy();#$x-copy()-bsqrt();

The latter two benchmark the copy() seperately from the copy()-bsqrt() to 
determine how much the bsqrt() takes alone. The copy() is neccessary to 
always bench the same bsqrt() operations (it would change $x otherwise).

I also attached two template files that do the actual benchmarking. First 
they make sure that the proper modules are loaded, then setup the opration 
(notable $c because our definition file will use this).

Of course, you can also just benchmark any code snippet:

./bb --code='$a =~ /abc/'

The biggst TODO is currently that it generates the benchmark and then 
displays the result from that in one step. This should be separated so that 
you can generate different outputs without the need to re-run the time 
consuming benchmarks.

If there is sufficient interest, I'll work on that.

I've found that benchmarking different module versions automatically on a 
wide range of ops enablesme to discover bugs - if something is suddenly 2 
times as slow than some subtle change broke something :)

Best wishes,

Tels

- -- 
 Signed on Sun Aug 22 14:04:08 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 We have problems like this all of the time, Kirk said, trying to
 reassure me.  Sometimes its really hard to get things burning. --
 http://tinyurl.com/qmg5

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBQSiMRXcLPEOTuEwVAQFpdAf/VIdrPKBsS1Lqf+tNzN50+q0tUM7/1mps
YyMmM6PqWhigZ90JLGcDZDvATOoAGkWCxVFVtsLvjBLoabHs10A5Jls5MsEOvgLh
4UGDMtRbfkhUJfI8KNHZgk7LIrZ8QvwmY/MiRWi3S2C+WBeu3rAtnTx65wZuuM5A
GjEK3Woo4vdvQbcaVOKLpdvgQbvxKLi+PwnvxXdZNkB8zwDVnOTkICTv2fOzlWLc
CiEa2N66GS5YGUZ5pnIlFCKtD3hI3Dd6XZLVSc+tjONw0qDG5Z8eOq4In9lF9GmS
RE9zzx5gc5x6Wtow7VkxKC1+Vd7UXxBMc3g8si2SPb5mOpV2lzylUw==
=l9Xr
-END PGP SIGNATURE-


new CPANTS version data

2004-08-22 Thread Thomas Klausner
Hi!

(crossposted from use.perl.org, http://use.perl.org/~domm/journal/20508)

As our kids where with their grandparents today and nothing else (cleaning
up etc) was todo, I used my tuits to work on CPANTS.

The results are a new version on CPAN (should arrive at your CPAN
mirror/search.cpan.org soonishly) and some new data.

The new version now uses Module::MakefilePL::Parse for Makefile.PL parsing,
nice progress bars courtesy of Term::ProgressBar, information on CPAN
authors, a nicer dist (MANIFEST, prerequisits), and some minor improvements.

But it doesn't contain more Kwalitee indicators. In fact it contains less,
as I dumped bad_permissions.

Maximum Kwalitee is 9 now, which is achieved by 142 distributions. Average
Kwalitee is 6.85366795366795.

Here's the Kwalitee distribution:

sqlite   select kwalitee,count(kwalitee) as cnt from kwalitee group by
   ...   kwalitee order by kwalitee;
   kwalitee  cnt
     --
   0 32
   1 4
   2 15
   3 87
   4 79
   5 315
   6 1595
   7 3794
   8 1702
   9 147

cpants.db now includes a new table called authors which provides information
on CPAN authors (cpanid, name, email, average kwalitee of all dists by this
author, total number of dists)

Here are the top 20 authors: (highest average Kwalitee AND more then 5 dists
on CPAN

sqlite select name,cpanid,average_kwalitee,distcount from authors where
... distcount5 order by average_kwalitee desc limit 20;
   name  cpanid  average_kwalitee  distcount
     --    --
   Dave Rolsky   DROLSKY 8.18918918918919  37
   Adam Kennedy  ADAMK   8.12121212121212  33
   Domizio DemichelisDOMIZIO 8 13
   David Wheeler DWHEELER8 12
   Mark Stosberg MARKSTOS8 7
   Joshua HoblittJHOBLITT8 6
   Julius C. Duque   JCDUQUE 8 17
   BarbieBARBIE  8 8
   Fabien Potencier  FABPOT  8 11
   Stephan Buys  STEPHANB8 12
   Ron SavageRSAVAGE 8 25
   Brian IngersonINGY7.979167  48
   Elizabeth Mattijsen   ELIZABETH   7.975 40
   Ian Langworth IAN 7.9   10
   Steven Schubiger  SCHUBIGER   7.84615384615385  13
   Schuyler Erle SDERLE  7.83  6
   Dana HudesDHUDES  7.83  6
   D. H. PODMASTER   7.81818181818182  11
   Ross McFarlandRMCFARLA7.81818181818182  11
   Dave CrossDAVECROSS   7.812516


You can get the SQLite file here: http://cpants.dev.zsi.at


- Forwarded message from PAUSE [EMAIL PROTECTED] -

Date: Sun, 22 Aug 2004 22:50:30 +0200
Subject: CPAN Upload: D/DO/DOMM/Module-CPANTS-Generator-0.21.tar.gz
To: Thomas Klausner [EMAIL PROTECTED]
From: PAUSE [EMAIL PROTECTED]

The uploaded file

Module-CPANTS-Generator-0.21.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/D/DO/DOMM/Module-CPANTS-Generator-0.21.tar.gz
  size: 13620 bytes
   md5: 249e7ecd1e0991dfbd88b1da70eb509e

No action is required on your part
Request entered by: DOMM (Thomas Klausner)
Request entered on: Sun, 22 Aug 2004 20:49:24 GMT
Request completed:  Sun, 22 Aug 2004 20:50:29 GMT

Thanks,
-- 
paused, v460


- End forwarded message -

-- 
#!/usr/bin/perl   http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$-gprint$_.$/}