Message:fmt.Sprintf("%d of %d clients (%d%%) are consuming video slower than, or too close to your bitrate of %d kbps.",unhealthyClientCount,totalNumberOfClients,int((float64(unhealthyClientCount)/float64(totalNumberOfClients))*100),int(lowestSupportedBitrate)),
HealthyPercentage:healthyPercentage,
}
returnfmt.Sprintf("%d of %d viewers (%d%%) are consuming video slower than, or too close to your bitrate of %d kbps.",unhealthyClientCount,totalNumberOfClients,int((float64(unhealthyClientCount)/float64(totalNumberOfClients))*100),int(lowestSupportedBitrate))
Message:fmt.Sprintf("The CPU usage on your server is over %d%%. This may cause video to be provided slower than necessary, causing buffering for your viewers. Consider increasing the resources available or reducing the number of output variants you made available.",maxCPUUsage),
returnfmt.Sprintf("You're broadcasting to Owncast at %dkbps but only sending to your viewers at %dkbps, requiring unnecessary work to be performed. You may want to decrease what you're sending to Owncast or increase what you send to your viewers to match.",inboundBitrate,maxBitrate)
returnfmt.Sprintf("The CPU usage on your server is over %d%%. This may cause video to be provided slower than necessary, causing buffering for your viewers. Consider increasing the resources available or reducing the number of output variants you made available.",maxCPUUsage)
}
funcerrorCountHealthOverviewMessage()string{
totalNumberOfClients:=len(windowedBandwidths)
iftotalNumberOfClients==0{
return""
}
clientsWithErrors:=getClientsWithErrorsCount()
ifclientsWithErrors==0{
returnnil
return""
}
// Only return these detailed values and messages if we feel we have enough
// clients to be able to make a reasonable assessment. This is an arbitrary
message=fmt.Sprintf("%d of %d clients (%d%%) are experiencing errors. You're currently using a video passthrough output, often known for causing playback issues for people. It is suggested you turn it off.",clientsWithErrors,totalNumberOfClients,healthyPercentage)
returnfmt.Sprintf("%d of %d viewers (%d%%) are experiencing errors. You're currently using a video passthrough output, often known for causing playback issues for people. It is suggested you turn it off.",clientsWithErrors,totalNumberOfClients,healthyPercentage)
}
returnfmt.Sprintf("%d of %d viewers (%d%%) may be experiencing some issues.",clientsWithErrors,totalNumberOfClients,healthyPercentage)