streaming_stats 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cd6bb0320c0121213ad55c75a005f0e5f788d1d6023b059a2ae75782b5807ef
4
- data.tar.gz: 8891c099cc6d3b5d4346af9f52194e9cce310a2880e7d097714a00901204aad6
3
+ metadata.gz: 4c3251062be9a44205d3dfd587e9c513288b9bb5414a65f68438e4bb7d58110d
4
+ data.tar.gz: b09feae11073ae734ed94fdd88c2866dc2295a1b3612a5e872185bf1bcc1bc0c
5
5
  SHA512:
6
- metadata.gz: a3069daabbc449a4d16e69ca524a017c97e6df8dc85c650e444ceee5ff7cdd41383c39ed552b0ad7a4087f40615e1f93e1069d670d2bf641f86804cfc623ad17
7
- data.tar.gz: 74e4fdb99d98e14697c25bf8bb6ad465f8869cb6d89c76e8b84d577ad2e4cb86868ba6996c53f64b8b3d91ee9a8e174b887197065bac1f7dd4b564a9a5ac471d
6
+ metadata.gz: 9ff2342d856ea6abb06e48a796dee98b8db37e32cf87de40fdf002d205da59c3c5e4d32bc40dd2f40ef662131703241949bbbe4384784af090889fe55f52e653
7
+ data.tar.gz: 219138d60059d9bab7afb8d0ad8e202fa0fb71041325da6077ff97bd185a22c4c41846e3bb01e42b3a93eca24e2c4afa6e3d98b956c363dde0c7800f0c0ec424
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Streaming Stats
2
2
 
3
- ![Ruby](https://github.com/willf/streaming_stats/actions/workflows/ruby.yml/badge.svg) [![Gem Version](https://badge.fury.io/rb/streaming_stats.svg)](https://badge.fury.io/rb/streaming_stats)
3
+ ![Ruby](https://github.com/willf/streaming_stats/actions/workflows/ruby.yml/badge.svg) [![Gem Version](https://badge.fury.io/rb/streaming_stats.svg)](https://badge.fury.io/rb/streaming_stats)
4
4
 
5
5
  StreamingStats is a Ruby class that takes streaming numeric data
6
6
  and return descriptive statistics with minimal overhead.
@@ -56,3 +56,29 @@ my very first Gist: https://gist.github.com/willf/187846.
56
56
  The approximate quartile method is a port of [streaming-percentiles-js](https://github.com/sengelha/streaming-percentiles-js).
57
57
 
58
58
  How to calculate streaming percentiles is discussed in Steven Englehardt's series, [Calculating Percentiles on Streaming Data](https://www.stevenengelhardt.com/series/calculating-percentiles-on-streaming-data/).
59
+
60
+
61
+ ## Script version
62
+
63
+ There is also a script version, which will take read numbers from STDIN and produce results on a regular basis:
64
+
65
+ ```
66
+ $ bin/streaming_stats --help
67
+ Prints streaming stats from numbers in $STDIN
68
+ -help, -h:
69
+ show help
70
+ --every x, -n x:
71
+ display stats every x numbers. default: 5
72
+ ```
73
+
74
+ For example:
75
+
76
+ ```
77
+ $ ping 8.8.8.8 | ack -oh '\d+\.\d{2,}' --flush | bin/streaming_stats -n 10
78
+ n v μ σ min max p99
79
+ 10 16.99 19.77 2.61 16.99 26.43 21.36
80
+ 20 25.19 20.56 2.87 16.99 27.13 26.43
81
+ ^C
82
+ 22 19.01 20.4 2.79 16.99 27.13 26.43
83
+
84
+ ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streaming_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Fitzgerald
@@ -30,7 +30,7 @@ files:
30
30
  - streaming_stats.rb
31
31
  - test/test_helper.rb
32
32
  - test/test_streaming_stats.rb
33
- homepage: https://github.com/willf/streaming_stats
33
+ homepage: https://github.com/willf/streaming_stats_ruby
34
34
  licenses:
35
35
  - MIT
36
36
  metadata: {}
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  requirements: []
52
- rubygems_version: 3.0.3
52
+ rubygems_version: 3.2.3
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: Calculates descriptive statistics from streams