From 728afca31c601f942f0f017251b04622f7855839 Mon Sep 17 00:00:00 2001 From: Daniel Bross Date: Thu, 22 Oct 2020 16:07:08 +0200 Subject: [PATCH 1/2] Fix datatypes for bit_rate_download and bit_rate_upload --- main.go | 4 ++-- main_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index e8d17cb..fb07e5e 100644 --- a/main.go +++ b/main.go @@ -15,8 +15,8 @@ var ( type videoBridgeStats struct { Threads int `json:"threads"` - BitRateDownload int `json:"bit_rate_download"` - BitRateUpload int `json:"bit_rate_upload"` + BitRateDownload float64 `json:"bit_rate_download"` + BitRateUpload float64 `json:"bit_rate_upload"` PacketRateDownload float64 `json:"packet_rate_download"` PacketRateUpload float64 `json:"packet_rate_upload"` LossRateDownload float64 `json:"loss_rate_download"` diff --git a/main_test.go b/main_test.go index 63ca992..028ad9e 100644 --- a/main_test.go +++ b/main_test.go @@ -109,8 +109,8 @@ jitsi_total_colibri_web_socket_messages_sent 0 { statsJson: `{ "audiochannels": 0, - "bit_rate_download": 0, - "bit_rate_upload": 0, + "bit_rate_download": 0.5, + "bit_rate_upload": 0.5, "conference_sizes": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], "conferences": 0, "current_timestamp": "2019-03-14 11:02:15.184", @@ -160,10 +160,10 @@ jitsi_total_colibri_web_socket_messages_sent 0 jitsi_threads 59 # HELP jitsi_bit_rate_download The total incoming bitrate for the video bridge in kilobits per second. # TYPE jitsi_bit_rate_download gauge -jitsi_bit_rate_download 0 +jitsi_bit_rate_download 0.5 # HELP jitsi_bit_rate_upload The total outgoing bitrate for the video bridge in kilobits per second. # TYPE jitsi_bit_rate_upload gauge -jitsi_bit_rate_upload 0 +jitsi_bit_rate_upload 0.5 # HELP jitsi_packet_rate_download The total incoming packet rate for the video bridge in packets per second. # TYPE jitsi_packet_rate_download gauge jitsi_packet_rate_download 0 From 59d9044feeccda125bfe3bebfd7de00463704e1e Mon Sep 17 00:00:00 2001 From: Daniel Bross Date: Fri, 23 Oct 2020 09:28:29 +0200 Subject: [PATCH 2/2] Fix codestyle --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index fb07e5e..ea32f12 100644 --- a/main.go +++ b/main.go @@ -15,8 +15,8 @@ var ( type videoBridgeStats struct { Threads int `json:"threads"` - BitRateDownload float64 `json:"bit_rate_download"` - BitRateUpload float64 `json:"bit_rate_upload"` + BitRateDownload float64 `json:"bit_rate_download"` + BitRateUpload float64 `json:"bit_rate_upload"` PacketRateDownload float64 `json:"packet_rate_download"` PacketRateUpload float64 `json:"packet_rate_upload"` LossRateDownload float64 `json:"loss_rate_download"`