Stream allocator fixes (#212)

* Stream allocator fixes

- Treat simple track like simulcast track with one layer to make
it stream allocator friendly.

* Address David's comments
This commit is contained in:
Raja Subramanian
2021-11-27 09:22:39 +05:30
committed by GitHub
parent dc60e27413
commit 092789a08f
8 changed files with 268 additions and 214 deletions
+4 -4
View File
@@ -372,9 +372,9 @@ func (c *Cluster) Process(p *Prober) bool {
}
func (c *Cluster) String() string {
activeTimeMs := time.Duration(0)
activeTimeMs := int64(0)
if !c.startTime.IsZero() {
activeTimeMs = time.Since(c.startTime) * time.Millisecond
activeTimeMs = time.Since(c.startTime).Milliseconds()
}
return fmt.Sprintf("bytes: desired %d / probe %d / non-probe %d / remaining: %d, time(ms): active %d / min %d / max %d",
@@ -383,6 +383,6 @@ func (c *Cluster) String() string {
c.bytesSentNonProbe,
c.desiredBytes-c.bytesSentProbe-c.bytesSentNonProbe,
activeTimeMs,
c.minDuration*time.Millisecond,
c.maxDuration*time.Millisecond)
c.minDuration.Milliseconds(),
c.maxDuration.Milliseconds())
}