Coder Social home page Coder Social logo

dumbbench's Introduction

Coverage Status

The Dumbbench module

This is the README for the Dumbbench Perl module. You're probably looking at this because you don't know where else to find what you're looking for. Read this once and you might never have to read one again for any Perl module.

Documentation

To read about Dumbbench, look at the embedded documentation in the module itself. Inside the distribution, you can format it with perldoc:

% perldoc lib/Dumbbench.pm

If you have already installed the module, you can specify the module name instead of the file location:

% perldoc Dumbbench

You can read the documentation and inspect the meta data on MetaCPAN.

The standard module documentation has example uses in the SYNOPSIS section, but you can also look in the examples/ directory (if it's there), or look at the test files in t/.

Installation

You can install this module with a CPAN client, which will resolve and install the dependencies:

% cpan Dumbbench
% cpanm Dumbbench

You can also install directly from the distribution directory, which will also install the dependencies:

% cpan .
% cpanm .

You could install just this module manually:

% perl Makefile.PL
% make
% make test
% make install

You probably don't want to do that unless you're fiddling with the module and only want to run the tests without installing anything.

Dumbbench::BoxPlot install

If you want to use Dumbbench::BoxPlot (check it's Pod for details), you will need to add more software than is initially required to just run Dumbbench.

First, you need to provide development headers for the ROOT application. How to install depends on your operational system requirements. For Ubuntu 16.04, installing the following packages will do:

sudo apt-get install libroot-gui-dev libroot-graf3d-g3d-dev libroot-graf3d-gl-dev libroot-graf2d-postscript-dev libroot-math-physics-dev

After that, you will need to install the SOOT distribution, which provides a Perl binding for ROOT. Once you have the required development headers and libraries, you just need to repeate the same steps already described for installing Dumbbench:

% cpanm SOOT

Source location

The meta data, such as the source repository and bug tracker, is in Makefile.PL or the META.* files it creates. You can find that on those CPAN web interfaces, but you can also look at files directly in the source repository:

If you find a problem, file a ticket in the issue tracker:

Getting help

Although I'm happy to hear from module users in private email, that's the best way for me to forget to do something.

Besides the issue trackers, you can find help at Perlmonks or Stackoverflow, both of which have many competent Perlers who can answer your question, almost in real time. They might not know the particulars of this module, but they can help you diagnose your problem.

You might like to read brian's Guide to Solving Any Perl Problem.

You should have received a LICENSE file, but the license is also noted in the module files. About the only thing you can't do is pretend that you wrote code that you didn't.

Good luck!

Enjoy,

brian d foy, [email protected] Steffen Mueller, [email protected]

dumbbench's People

Contributors

briandfoy avatar earino avatar ericherman avatar glasswalk3r avatar karenetheridge avatar ppisar avatar tsee avatar xdg avatar xenu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dumbbench's Issues

repo does not allow pull requests

Question: can github pull requests be created between two git repos if they were created externally rather than using githubs "fork" GUI interface? I would expect that "Compare across forks" to allow for this, but seemingly not. Or am I holding it wrong?

https://github.com/briandfoy/dumbbench seems to have been uploaded to github without using the GUI "fork" feature.

The repo ericherman/dumbbench was forked from tsee/dumbbench -- pull requests work there.

If github's cross-fork features are not sophisticated enough to deal with externally uploaded identical repos, and if github's briandfoy/dumbbench is the new authority repo for dumbbench, perhaps it makes sense to re-create it on github as a fork of tsee/dumbbench such that existing forks from tsee can create pull requests to briandfoy. What do you think?

align rate and precision separately in report

each line of the report can have a different number of significant digits for both the rate and the precision, so the values in the report don't line up and this makes it harder than it should be to compare the results. the easiest approach might be to have an option to disable showing the precision.

example from Benchmark::Dumb pod:

                      Rate        b      a
     b   5.75e+06+-47000/s       -- -70.1%
     a 1.925e+07+-650000/s 235+-12%     --

Make float option accessable from Benchmark::Dumb

Since most people use the Benchmark::Dumb interface, it would make sense to reimplement the float option as a constructor option to Dumbbench instead of as an option to report().

  • This request was deleted from the old repo here: tsee/dumbbench#10 instead of being readded to the new repo. Adding back so other users can see and implement if they want.

Negative rate

About 50% of the time when I run this contrived example, the rate of fast is reported as negative. Regular Benchmark doesn't suffer from this because it explicitly tests for this.

#!/usr/bin/env perl
use strict;
use warnings;

use Benchmark::Dumb qw(:all);
# use Benchmark qw(:all :hireswallclock);
use Time::HiRes qw(sleep);

cmpthese 0, {
    fast => sub { return 1 },
    slow => sub { sleep 0.001; return 1 },
};

what unit are the measurements reported in?

For results like Rounded run time per iteration: 2.3207e+00 +/- 8.4e-03 (0.4%) -- what unit is this runtime reported in? Given that they are per iteration, are they milliseconds? Or perhaps microseconds (µs)?

LICENSE inconsistencies

dumbbench/LICENSE

Lines 1 to 7 in 490bac1

The Dumbbench module is licensed under the same terms as perl
itself, under the Artistic License 2.0.
Artistic License 2.0
Copyright (c) 2000-2006, The Perl Foundation.
http://www.perlfoundation.org/artistic_license_2_0

'LICENSE' => 'perl',

dumbbench/lib/Dumbbench.pm

Lines 538 to 540 in 490bac1

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.1 or,
at your option, any later version of Perl 5 you may have available.

( And in fact, all modules site the same perl5- license blurb )

Thus, it seems the error is the LICENSE file itself having the wrong content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.