Coder Social home page Coder Social logo

cpipe's Introduction

cpipe --- counting pipe

Introduction

Did you ever want to know how fast your tar is or how much data it has transferred already. How about using socket or nc to copy files either with or without compression over a fast network connection, which one is faster?

If you want to know the answer, use cpipe as a totally unscientific approach to measure throughput. Cpipe copies its standard input to its standard output while measuring the time it takes to read an input buffer and write an output buffer. Statistics of average throughput and the total amount of bytes copied are printed to the standard error output.

Example

The command

  tar cCf / - usr | cpipe -vr -vw -vt > /dev/null

results in an output like

...
  in:  19.541ms at    6.4MB/s (   4.7MB/s avg)    2.0MB
 out:   0.004ms at   30.5GB/s (  27.1GB/s avg)    2.0MB
thru:  19.865ms at    6.3MB/s (   4.6MB/s avg)    2.0MB
...

The first column shows the times it takes to handle one buffer of data (128kB by default). The read-call took 19.541ms, the write-call to /dev/null took just 0.004ms and from the start of the read to the end of write, it took 19.865ms.

The second column shows the result of dividing the buffer size (128kB by default) by the times in the first column.

cpipe's People

Contributors

haraldki avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.