Closed tphakala closed 2 months ago
The changes introduce a new dependency on the gopsutil
library to the project, enabling system and process information retrieval. Additionally, significant improvements are made to error handling and system diagnostics in the internal/myaudio/buffers.go
file, including the addition of functions for capturing system resource metrics and converting byte values to megabytes.
File | Change Summary |
---|---|
go.mod |
Added dependency: github.com/shirou/gopsutil v3.21.11+incompatible |
internal/myaudio/buffers.go |
Introduced captureSystemInfo for system diagnostics and bToMb for byte-to-megabyte conversion; improved error handling and removed commented-out code. |
sequenceDiagram
participant AudioBuffer
participant SystemInfo
AudioBuffer->>SystemInfo: WriteToAnalysisBuffer()
alt Error Occurs
SystemInfo->>SystemInfo: captureSystemInfo()
SystemInfo-->>AudioBuffer: Log system diagnostics
end
🐇 In the meadow where bytes do play,
A new helper hops in, brightening the day.
With gopsutil's magic, we gather and see,
The whispers of RAM and CPU's glee!
Errors now dance with clearer insight,
In the world of audio, all feels just right! 🎶
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
… buffer write fails