Giter Club home page Giter Club logo

b's Introduction

Build Status

Important Notice

I'm no longer actively maintaining this project. If you are interested supporting it - ping me on twitter. The only thing that I will ask you is to not change the API drastically. If you are planning on doing that - better start a brand new project.

If you want me to transfer you only the name on npm, I'd be happy to only if the project does not have any downloads on npm lately. In case it's being downloaded, there are people that depend on it and might step up and start maintaining, so I will not transfer it to you, regardless if you want to release a new major version etc.

If you have any other questions, let me know.

Thanks!

Veselin

B - Benchmarks for Node.js

Description

B is small and elegant module for Node.js that makes benchmarking fun.

Features

  • Async, sync & parrallel benchmarks
  • Streams
  • Reporters

Synopsis

Synchronous

var b = require('b');

b('Synchronous benchmark').run(100, function(i) {
  // do stuff
});

Asynchronous

var b = require('b');

b('Asynchronous benchmark').run(10, function(i, done) {
  // do stuff
  done();
});

Select a reporter

b('make pretty and print to console').reporter('cli')
b('output json data').reporter('json')

Build your reporter

function Reporter() {};

Reporter.prototype.report = function(name, result, iterations) {
  // report it
};

b('Custom reporter')
  .reporter(new Reporter)
  .run(10, function() {
    // benchmark stuff
  });

Events

  • start
  • stop
  • done

Requirements

Install

$ npm install b

Tests

$ npm install
$ make test

Contributors

 project  : b
 repo age : 11 months ago
 active   : 5 days
 commits  : 46
 files    : 16
 authors  :
    29	Veselin Todorov         63.0%
    16	jkroso                  34.8%
     1	Jakeb                   2.2%

License

MIT License

Copyright (C) 2012 Veselin Todorov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

b's People

Contributors

davedoesdev avatar jkroso avatar vesln avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

b's Issues

mocha style test trees within a single file

being able to write several benchmarks in a single file would make it a lot cleaner to generate a series of benchmarks with only slight differences. e.g. by using higher order functions and that sort of thing. Initially I though this would make running benchmarks in separate processes hacky and leaky but on second thought I can't see why that needs be the case. So long as there aren't any major side effects while loading a suite.

Error in dependencies

Getting this error:

Error: Cannot find module 'when/decorate'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/david/Private/hub/common/qlobber/node_modules/b/node_modules/foreach/series.js:2:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Exited with code: 8.

I think the npm dedupe is removing the wrong one.

node_modules/b/node_modules/when/package.json says it's version 2.2.1

But

node_modules/b/node_modules/foreach/pakage.json says it needs 3.2.4 tarball

run to fixed certainty

I think fixed iteration and fixed time benchmarks will both be affected by hard to predict platform level performance fluctuations. e.g. if you run the same file in a comparison against itself the second instance will be faster 9 times in 10. I guess the hardware warms up or something. A way around this would be to take multiple samples until the sample error falls below a certain level. statistics theory required though!

Version on npmjs

npm install b brings in 2.0.1 but package.json says 3.0.0 on github.
Is 3.0.0 ready to try out in anger?

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.