bipbip 0.6.20 → 0.6.21

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
  SHA1:
3
- metadata.gz: 5172b62b72e5a295a8e1c207e542a1c85bc895be
4
- data.tar.gz: d84c068a561ca1fbc40ac41e3ef8ceb392f1dd24
3
+ metadata.gz: 174da8347786e9ab567f19333462144d97633d37
4
+ data.tar.gz: 3685e0304414384b269df248643fc8c644eb0487
5
5
  SHA512:
6
- metadata.gz: c25d82cac3eb33051656668e088b941ac35b56216318e3dcdb769a3c80be37a5a498afe022e1da35bb89e357afec2151ae237ace16213720e7e09a8b99385755
7
- data.tar.gz: 39907caf4fd5323536ca36393fcc70e2e31631a22afd5531c07185ca6646a480fdd5421b254d133acdb92e63d2301809aadd1e942dec19fb2e3dfdac021c1b9a
6
+ metadata.gz: 62c40d66098b521c5ef5f5611cd961c0cc200c732215d111ef995784814814093a921ba73075fc57e5e79a6926d1a0adb9605b9ab9320c61074261a1224c00df
7
+ data.tar.gz: 730e023dcd9bf1aa872682053d94e262a9ac140f4360fbc6728e9b5159f303a17c392db2f606d4b73f11ed20f89432eeadc1a7a1f0ad942514fd0f3520f2b6bf
@@ -13,8 +13,10 @@ module Bipbip
13
13
  { name: 'streams_zero_bitrate_count', type: 'gauge', unit: 'Streams' },
14
14
  { name: 'streams_packet_loss_audio_max', type: 'gauge', unit: '%' },
15
15
  { name: 'streams_packet_loss_audio_avg', type: 'gauge', unit: '%' },
16
+ { name: 'streams_packet_loss_audio_count', type: 'counter', unit: 'Packets' },
16
17
  { name: 'streams_packet_loss_video_max', type: 'gauge', unit: '%' },
17
- { name: 'streams_packet_loss_video_avg', type: 'gauge', unit: '%' }
18
+ { name: 'streams_packet_loss_video_avg', type: 'gauge', unit: '%' },
19
+ { name: 'streams_packet_loss_video_count', type: 'counter', unit: 'Packets' }
18
20
  ]
19
21
  end
20
22
 
@@ -23,8 +25,8 @@ module Bipbip
23
25
  mountpoints = data['data']['list']
24
26
  streams = mountpoints.map { |mp| mp['streams'] }.flatten
25
27
 
26
- packet_loss_audio_avg = streams.count != 0 ? streams.map { |s| s['stats']['audio']['packet-loss'] || 0 }.reduce(0, :+) / streams.count : 0
27
- packet_loss_video_avg = streams.count != 0 ? streams.map { |s| s['stats']['video']['packet-loss'] || 0 }.reduce(0, :+) / streams.count : 0
28
+ packet_loss_audio_avg = streams.count != 0 ? streams.map { |s| s['stats']['audio']['packet-loss-rate'] || 0 }.reduce(0, :+) / streams.count : 0
29
+ packet_loss_video_avg = streams.count != 0 ? streams.map { |s| s['stats']['video']['packet-loss-rate'] || 0 }.reduce(0, :+) / streams.count : 0
28
30
 
29
31
  {
30
32
  'mountpoint_count' => mountpoints.count,
@@ -34,10 +36,12 @@ module Bipbip
34
36
  'streams_bandwidth' => streams.map { |s| (s['stats']['video']['bitrate'] || 0) + (s['stats']['audio']['bitrate'] || 0) }.reduce(0, :+),
35
37
  'streams_zero_fps_count' => streams.count { |s| s['frame']['fps'] == 0 },
36
38
  'streams_zero_bitrate_count' => streams.count { |s| s['stats']['video']['bitrate'].nil? || s['stats']['video']['bitrate'] == 0 },
37
- 'streams_packet_loss_audio_max' => streams.map { |s| (s['stats']['audio']['packet-loss'] || 0) * 100 }.max,
39
+ 'streams_packet_loss_audio_max' => streams.map { |s| (s['stats']['audio']['packet-loss-rate'] || 0) * 100 }.max,
38
40
  'streams_packet_loss_audio_avg' => packet_loss_audio_avg * 100,
39
- 'streams_packet_loss_video_max' => streams.map { |s| (s['stats']['video']['packet-loss'] || 0) * 100 }.max,
40
- 'streams_packet_loss_video_avg' => packet_loss_video_avg * 100
41
+ 'streams_packet_loss_audio_count' => streams.map { |s| (s['stats']['audio']['packet-loss-count'] || 0) }.reduce(0, :+),
42
+ 'streams_packet_loss_video_max' => streams.map { |s| (s['stats']['video']['packet-loss-rate'] || 0) * 100 }.max,
43
+ 'streams_packet_loss_video_avg' => packet_loss_video_avg * 100,
44
+ 'streams_packet_loss_video_count' => streams.map { |s| (s['stats']['video']['packet-loss-count'] || 0) }.reduce(0, :+)
41
45
  }
42
46
  end
43
47
 
@@ -120,7 +120,8 @@ module Bipbip
120
120
  'total_time' => { '$sum' => '$millis' },
121
121
  'max_time' => { '$max' => '$millis' }
122
122
  } }
123
- ])
123
+ ]
124
+ )
124
125
 
125
126
  unless results.count == 0
126
127
  result = results.first
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.6.20'.freeze
2
+ VERSION = '0.6.21'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bipbip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.20
4
+ version: 0.6.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cargo Media
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-04-26 00:00:00.000000000 Z
13
+ date: 2016-06-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: copperegg-revealmetrics