Skip to content

Commit

Permalink
Merge pull request #10 from awesome-it/fix-datatype
Browse files Browse the repository at this point in the history
Fix datatypes for bit_rate_download and bit_rate_upload
  • Loading branch information
0x46616c6b authored Oct 23, 2020
2 parents dbea51e + 59d9044 commit 0c4ca90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
8 changes: 4 additions & 4 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0c4ca90

Please sign in to comment.