Skip to content

feat(PCMLocalTrack): add option to grab track and hw stats#879

Merged
anunaym14 merged 2 commits intomainfrom
am/pcmwriter-logging
Apr 8, 2026
Merged

feat(PCMLocalTrack): add option to grab track and hw stats#879
anunaym14 merged 2 commits intomainfrom
am/pcmwriter-logging

Conversation

@anunaym14
Copy link
Copy Markdown
Member

Inspired by #788, put behind an option

@anunaym14 anunaym14 requested review from boks1971 and milos-lk April 8, 2026 05:38
enableStats: params.EnableStats,
cpuStats: cpuStats,
memStats: memStats,
logState: pcmLocalTrackLogState{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like logState is on irrespective of the enables, can that be turned off if stats are not enabled or just too much of hassle?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread pkg/media/pcmlocaltrack.go Outdated
}

func (t *PCMLocalTrack) collectLogSnapshotLocked(now time.Time) *pcmLocalTrackLogSnapshot {
if !t.enableStats && t.cpuStats == nil && t.memStats == nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need cpu/mem stats check against nil here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleaned it up a bit!

@anunaym14 anunaym14 merged commit 5d1134a into main Apr 8, 2026
7 checks passed
@anunaym14 anunaym14 deleted the am/pcmwriter-logging branch April 8, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants