Socket
Book a DemoInstallSign in
Socket

hist

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hist

generate histograms

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

hist: generate histograms

Generates DTrace-style power-of-two histograms from streams of numbers. On systems with jot(1) to generate random data, try:

$ jot -r 10 | ~/Manta/MarlinTools/hist2/hist 
           value  ------------- Distribution ------------- count
             0.5 |                                         0
               1 |@@@@                                     1
               2 |                                         0
               4 |                                         0
               8 |                                         0
              16 |@@@@@@@@                                 2
              32 |@@@@@@@@@@@@                             3
              64 |@@@@@@@@@@@@@@@@                         4
             128 |                                         0

Your example will differ because that "-r" generates random data. For deterministic, sequential data:

$ seq 10 100 | ~/Manta/MarlinTools/hist2/hist 
           value  ------------- Distribution ------------- count
               4 |                                         0
               8 |@@@                                      6
              16 |@@@@@@@                                  16
              32 |@@@@@@@@@@@@@@                           32
              64 |@@@@@@@@@@@@@@@@                         37
             128 |                                         0

FAQs

Package last updated on 18 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts