Code Monkey home page Code Monkey logo

libp2p-perf-bench's Introduction

libp2p-perf-bench

The iPerf equivalent for the libp2p ecosystem.

In a nutshell a client sends as much data as possible through a single multiplexed stream to a server which reads and discards all received data. The client closes the stream after 10 seconds. Subsequently both the client and the server print the result as the total number of bytes transferred and the corresponding bandwidth on stdout.

Implementations

  • Golang

    • Transport: Tcp

    • Transport security: Noise or Plaintext

    • Multiplexing: Yamux

  • Rust

    • Transport: Tcp

    • Transport security: Noise or Plaintext

    • Multiplexing: Yamux

Getting started

$ make clean

#if you want you can make a new key pair
$ rm rust/test.pk8
$ make rust/test.pk8

#And finally build rust/go client and server
$ make


$ ./run.sh

# Start Rust and Golang servers.

# Rust -> Rust

## Transport security noise
Interval	Transfer	Bandwidth
0 s - 10.00 s	11088 MBytes	8870.34 MBit/s

## Transport security plaintext
Interval	Transfer	Bandwidth
0 s - 10.00 s	33133 MBytes	26506.40 MBit/s

# Rust -> Golang

## Transport security noise
Interval	Transfer	Bandwidth
0 s - 10.00 s	7375 MBytes	5899.94 MBit/s

## Transport security plaintext
Interval	Transfer	Bandwidth
0 s - 10.00 s	32453 MBytes	25962.27 MBit/s

# Golang -> Rust

## Transport security noise
Interval 	Transfer	Bandwidth
0s - 10.00 s 	7541 MBytes	6032.64 MBit/s

## Transport security plaintext
Interval 	Transfer	Bandwidth
0s - 10.00 s 	55181 MBytes	44144.62 MBit/s

# Golang -> Golang

## Transport security noise
Interval 	Transfer	Bandwidth
0s - 10.00 s 	6223 MBytes	4978.17 MBit/s

## Transport security plaintext
Interval 	Transfer	Bandwidth
0s - 10.00 s 	90379 MBytes	72303.12 MBit/s

$ sysctl -n machdep.cpu.brand_string
Apple M2

License

Licensed under either of

at your option.

libp2p-perf-bench's People

Watchers

Anastasios Kaltakis 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.