Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

ipfs-inactive/ipfs-performance-profiling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipfs-performance-profiling

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 import-files -- --envs=js-http

JSON output

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

$ npm run benchmarks import-files -- --json

Reports

You run and produce HTML reports using:

$ npm run benchmarks:report

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 them to the src/suites dir. 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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •