GithubHelp home page GithubHelp logo

kryndex / ipfs-performance-profiling Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ipfs-inactive/ipfs-performance-profiling

0.0 2.0 0.0 459 KB

Benchmarking tests for js-ipfs, using go-ipfs as a baseline.

License: MIT License

CSS 0.86% JavaScript 56.84% HTML 42.29%

ipfs-performance-profiling's Introduction

ipfs-performance-profiling

js-standard-style

Benchmarking tests for js-ipfs, using go-ipfs as a baseline.

Install

$ git clone https://github.com/ipfs/ipfs-performance-profiling.git
$ cd ipfs-performance-profiling
$ npm install

Run

Run all benchmarks on all environments:

$ npm run benchmarks

Run all benchmarks on the go and js-core environments:

$ npm run benchmarks -- --envs=go,js-core

Available environments are:

  • go
  • js-core
  • js-http

Run named benchmark on the js-http environment:

$ npm run benchmarks -- files-add-1MB-file --envs=js-http

JSON output

You can output a JSON report using the --json options:

$ npm run benchmarks -- files-add-1MB-file --json

Reports

You run and produce an HTML report using:

$ npm run benchmarks:report

Report with profiling data

You run and produce an HTML report containing links to profiling data using:

$ npm run benchmarks:report:profile -- [<suite>] --envs=[env1,env2]

Creating a benchmark suite

A benchmark suite is simply a function that gets two arguments: an IPFS client object and a callback:

module.exports = function (ipfs, callback) {
  ipfs.files.add([{
    path: 'a.txt',
    content: new Buffer('a')
  }], callback)
}

Add it under its own dir under src/suites. Also, don't forget to add an entry to src/suites/index.js so that it can be found.

Logging

The suite runner uses the stdout channel for the benchmark results. If you want to log to the console, use console.error instead.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

MIT

ipfs-performance-profiling's People

Contributors

pgte avatar daviddias avatar

Watchers

James Cloos avatar  avatar

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.