Skip to content

Commit

Permalink
monitor: Broadcaster only logic in SegmentEmerged
Browse files Browse the repository at this point in the history
  • Loading branch information
yondonfu committed Nov 27, 2020
1 parent 0ab7f6f commit 27f2247
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion monitor/census.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,9 @@ func SetTranscodersNumberAndLoad(load, capacity, number int) {

func SegmentEmerged(nonce, seqNo uint64, profilesNum int, dur float64) {
glog.V(logLevel).Infof("Logging SegmentEmerged... nonce=%d seqNo=%d duration=%v", nonce, seqNo, dur)
census.segmentEmerged(nonce, seqNo, profilesNum)
if census.nodeType == Broadcaster {
census.segmentEmerged(nonce, seqNo, profilesNum)
}
stats.Record(census.ctx, census.mSourceSegmentDuration.M(dur))
}

Expand Down
2 changes: 1 addition & 1 deletion monitor/census_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestLastSegmentTimeout(t *testing.T) {
defer func() { unitTestMode = false }()
NodeID = "testid"

InitCensus("tst", "testversion")
InitCensus("bctr", "testversion")
// defer func() {
// shutDown <- nil
// }()
Expand Down

0 comments on commit 27f2247

Please sign in to comment.