streaming_stats 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -14
- data/Gemfile.linting +4 -0
- data/Gemfile.lock +14 -78
- data/README.md +27 -1
- data/streaming_stats.rb +1 -5
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5bff37aefae7e5061d9b2b55b83ac8fe13ffb1d1d5650bd3f7b82f822b9fbcc
|
4
|
+
data.tar.gz: e1c267490d0ccc145d0066ecd564ef2966ed60645e53aa7602194b467450e1ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73c8e9637217ffa3cb34c8f3f0b213fc32bdd3b4de8698e984fd2ef50ca977f70eb089d93cc058870a1138eb1ee9d2cfd67e8ddfbb3acdacb1da57d71a8b9e33
|
7
|
+
data.tar.gz: f53c51f424818c710f4303e6d0edde4e493042b379ab5644540c8ff2aee06442df245b2a882bf52cc7a5de46a4a1b61615b2bff27fa930a1712ba2b5b2ab4fa0
|
data/Gemfile
CHANGED
@@ -1,24 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
|
-
gem '
|
4
|
+
gem 'optimist'
|
5
5
|
|
6
6
|
group :development, :test do
|
7
|
-
gem 'byebug'
|
8
|
-
gem 'distribution'
|
9
|
-
gem 'guard'
|
10
|
-
gem 'guard-minitest'
|
11
|
-
gem 'guard-rubocop'
|
12
7
|
gem 'minitest'
|
13
|
-
gem 'mocha'
|
14
8
|
gem 'pry'
|
15
9
|
gem 'rake'
|
16
|
-
gem 'terminal-notifier-guard'
|
17
|
-
# If you update rubocop or rubocop-rails, please also update Gemfile.linting
|
18
10
|
gem 'rubocop', '~> 0.5'
|
19
|
-
gem 'rubocop-performance'
|
20
|
-
end
|
21
|
-
|
22
|
-
group :development do
|
23
|
-
gem 'simplecov'
|
24
11
|
end
|
data/Gemfile.linting
ADDED
data/Gemfile.lock
CHANGED
@@ -1,61 +1,21 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
6
|
-
i18n (>= 0.7, < 2)
|
7
|
-
minitest (~> 5.1)
|
8
|
-
tzinfo (~> 1.1)
|
9
|
-
ast (2.4.1)
|
10
|
-
byebug (11.1.3)
|
4
|
+
ast (2.4.2)
|
11
5
|
coderay (1.1.3)
|
12
|
-
concurrent-ruby (1.1.7)
|
13
|
-
distribution (0.8.0)
|
14
|
-
docile (1.3.2)
|
15
|
-
ffi (1.13.1)
|
16
|
-
formatador (0.2.5)
|
17
|
-
guard (2.16.2)
|
18
|
-
formatador (>= 0.2.4)
|
19
|
-
listen (>= 2.7, < 4.0)
|
20
|
-
lumberjack (>= 1.0.12, < 2.0)
|
21
|
-
nenv (~> 0.1)
|
22
|
-
notiffany (~> 0.0)
|
23
|
-
pry (>= 0.9.12)
|
24
|
-
shellany (~> 0.0)
|
25
|
-
thor (>= 0.18.1)
|
26
|
-
guard-compat (1.2.1)
|
27
|
-
guard-minitest (2.4.6)
|
28
|
-
guard-compat (~> 1.2)
|
29
|
-
minitest (>= 3.0)
|
30
|
-
guard-rubocop (1.4.0)
|
31
|
-
guard (~> 2.0)
|
32
|
-
rubocop (< 2.0)
|
33
|
-
i18n (1.8.5)
|
34
|
-
concurrent-ruby (~> 1.0)
|
35
|
-
listen (3.3.3)
|
36
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
37
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
38
|
-
lumberjack (1.2.8)
|
39
6
|
method_source (1.0.0)
|
40
|
-
minitest (5.14.
|
41
|
-
|
42
|
-
nenv (0.3.0)
|
43
|
-
notiffany (0.1.3)
|
44
|
-
nenv (~> 0.1)
|
45
|
-
shellany (~> 0.0)
|
7
|
+
minitest (5.14.4)
|
8
|
+
optimist (3.0.1)
|
46
9
|
parallel (1.20.1)
|
47
|
-
parser (
|
10
|
+
parser (3.0.1.1)
|
48
11
|
ast (~> 2.4.1)
|
49
|
-
pry (0.
|
12
|
+
pry (0.14.1)
|
50
13
|
coderay (~> 1.1)
|
51
14
|
method_source (~> 1.0)
|
52
15
|
rainbow (3.0.0)
|
53
|
-
rake (13.0.
|
54
|
-
|
55
|
-
|
56
|
-
ffi (~> 1.0)
|
57
|
-
regexp_parser (2.0.0)
|
58
|
-
rexml (3.2.4)
|
16
|
+
rake (13.0.3)
|
17
|
+
regexp_parser (2.1.1)
|
18
|
+
rexml (3.2.5)
|
59
19
|
rubocop (0.93.1)
|
60
20
|
parallel (~> 1.10)
|
61
21
|
parser (>= 2.7.1.5)
|
@@ -65,44 +25,20 @@ GEM
|
|
65
25
|
rubocop-ast (>= 0.6.0)
|
66
26
|
ruby-progressbar (~> 1.7)
|
67
27
|
unicode-display_width (>= 1.4.0, < 2.0)
|
68
|
-
rubocop-ast (1.
|
69
|
-
parser (>=
|
70
|
-
|
71
|
-
rubocop (>= 0.90.0, < 2.0)
|
72
|
-
rubocop-ast (>= 0.4.0)
|
73
|
-
ruby-progressbar (1.10.1)
|
74
|
-
shellany (0.0.1)
|
75
|
-
simplecov (0.20.0)
|
76
|
-
docile (~> 1.1)
|
77
|
-
simplecov-html (~> 0.11)
|
78
|
-
simplecov_json_formatter (~> 0.1)
|
79
|
-
simplecov-html (0.12.3)
|
80
|
-
simplecov_json_formatter (0.1.2)
|
81
|
-
terminal-notifier-guard (1.7.0)
|
82
|
-
thor (1.0.1)
|
83
|
-
thread_safe (0.3.6)
|
84
|
-
tzinfo (1.2.8)
|
85
|
-
thread_safe (~> 0.1)
|
28
|
+
rubocop-ast (1.5.0)
|
29
|
+
parser (>= 3.0.1.1)
|
30
|
+
ruby-progressbar (1.11.0)
|
86
31
|
unicode-display_width (1.7.0)
|
87
32
|
|
88
33
|
PLATFORMS
|
89
|
-
|
34
|
+
x86_64-darwin-19
|
90
35
|
|
91
36
|
DEPENDENCIES
|
92
|
-
activesupport (~> 5.2)
|
93
|
-
byebug
|
94
|
-
distribution
|
95
|
-
guard
|
96
|
-
guard-minitest
|
97
|
-
guard-rubocop
|
98
37
|
minitest
|
99
|
-
|
38
|
+
optimist
|
100
39
|
pry
|
101
40
|
rake
|
102
41
|
rubocop (~> 0.5)
|
103
|
-
rubocop-performance
|
104
|
-
simplecov
|
105
|
-
terminal-notifier-guard
|
106
42
|
|
107
43
|
BUNDLED WITH
|
108
|
-
2.
|
44
|
+
2.2.15
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Streaming Stats
|
2
2
|
|
3
|
-
![Ruby](https://github.com/willf/
|
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
|
+
```
|
data/streaming_stats.rb
CHANGED
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.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Fitzgerald
|
@@ -17,6 +17,7 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- Gemfile
|
20
|
+
- Gemfile.linting
|
20
21
|
- Gemfile.lock
|
21
22
|
- LICENSE
|
22
23
|
- README.md
|
@@ -29,7 +30,7 @@ files:
|
|
29
30
|
- streaming_stats.rb
|
30
31
|
- test/test_helper.rb
|
31
32
|
- test/test_streaming_stats.rb
|
32
|
-
homepage: https://github.com/willf/
|
33
|
+
homepage: https://github.com/willf/streaming_stats_ruby
|
33
34
|
licenses:
|
34
35
|
- MIT
|
35
36
|
metadata: {}
|
@@ -41,14 +42,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
41
42
|
requirements:
|
42
43
|
- - ">="
|
43
44
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
45
|
+
version: 2.6.6
|
45
46
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
47
|
requirements:
|
47
48
|
- - ">="
|
48
49
|
- !ruby/object:Gem::Version
|
49
50
|
version: '0'
|
50
51
|
requirements: []
|
51
|
-
rubygems_version: 3.
|
52
|
+
rubygems_version: 3.2.3
|
52
53
|
signing_key:
|
53
54
|
specification_version: 4
|
54
55
|
summary: Calculates descriptive statistics from streams
|