streaming_stats 0.1.0 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f8c9052c66697c167070b7855fe5e7964ebaed158a698565e8592d510b16562
4
- data.tar.gz: 204081b5f172a2cdd03ddeabd3df30ac4d89e89d2b50a0796e81cc6bd19d778a
3
+ metadata.gz: a5bff37aefae7e5061d9b2b55b83ac8fe13ffb1d1d5650bd3f7b82f822b9fbcc
4
+ data.tar.gz: e1c267490d0ccc145d0066ecd564ef2966ed60645e53aa7602194b467450e1ea
5
5
  SHA512:
6
- metadata.gz: 74456f61026259b87b9a5f8a08c263823183e825305cfcc9ce9451571b56337a3a1a5bdab4335b974df3273c4fcf713d32d322973ed88682ce8c3a3857737000
7
- data.tar.gz: c9f2921fed3e04a268d79fec6002f85a2393174c822ae8873d70fcfa8a1eaad66f05d252165ab4ff0a6716c1362ad42090aaef7a75f0df1c96249c4a24fd45c0
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 'activesupport', '~> 5.2'
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
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rubocop", "~> 0.5"
4
+
data/Gemfile.lock CHANGED
@@ -1,61 +1,21 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (5.2.4.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.2)
41
- mocha (1.11.2)
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 (2.7.2.0)
10
+ parser (3.0.1.1)
48
11
  ast (~> 2.4.1)
49
- pry (0.13.1)
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.1)
54
- rb-fsevent (0.10.4)
55
- rb-inotify (0.10.1)
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.3.0)
69
- parser (>= 2.7.1.5)
70
- rubocop-performance (1.9.1)
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
- ruby
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
- mocha
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.1.4
44
+ 2.2.15
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Streaming Stats
2
2
 
3
- ![Ruby](https://github.com/willf/streaming-stats/workflows/Ruby/badge.svg)
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
@@ -1,7 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rubygems'
4
- require 'bundler/setup'
5
- require 'active_support/all'
6
-
7
- require './lib/streaming_stats'
3
+ require_relative './lib/streaming_stats'
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.0
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/streaming_stats
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: '2.4'
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.0.3
52
+ rubygems_version: 3.2.3
52
53
  signing_key:
53
54
  specification_version: 4
54
55
  summary: Calculates descriptive statistics from streams