简体中文界面。帖子、指南及政策正文保留原文;未对原文作自动翻译。

the log file stops my display

VictorChen1142 · 2025年5月27日 12:19 UTC

已关闭
VI
VictorChen1142
My FR5 diagnostic replay looks disconnected when I export a large log from the same folder. The display freezes, then several readings appear together. I added detailed logging recently. This application only displays diagnostics. Another person will maintain it after me, and I do not want to leave them an 'offline' warning which actually means my file handling is slow. Where should I put timing checks first?

13 条回复

LE
LeahBarnes0582

Time the receive step, file write and display update separately, using a monotonic clock for durations so a clock adjustment does not confuse the comparison.

18
VI
VictorChen1142

Receive and file write are in the same callback. I only timed the whole callback before. I can split that measurement.

6
HA
HazelBrown0919

Get the file write out of that callback. A busy disk shouldn't make the screen sit there pretending nothing has changed. But cap whatever queue you add, or you'll just build a different mess.

20
LE
LeahBarnes0582

I would keep the measurements first, since moving the write will not help if the callback is also waiting on another blocking operation.

6
HA
HazelBrown0919

Sure, time it. I wouldn't keep the design though, even if this particular stall turns out to be elsewhere.

25
VI
VictorChen1142

The long interval is inside the file write. Receive finishes before it. Thank you for suggesting separate timings; the combined number hid that.

15
YA
YasminBennett0702

Show the age of the last reading too. A frozen value can look perfectly believable if you're not staring at the clock.

21
AA
AaronBaker0436

I'd let routine diagnostic lines drop before letting the queue eat all the memory, but show how many were dropped. Otherwise support gets a very convincing incomplete log.

11
LE
LeahBarnes0582

That policy depends on the log's purpose; if particular events must be retained, distinguish them from high-volume diagnostic samples and make a recording failure visible.

21
AA
AaronBaker0436

Yes, I meant the repeated sample lines. Not every event. Thanks for catching that; I'd label the two streams separately in the handover.

15
VI
VictorChen1142

I tried a bounded queue in the replay application. The display continues while the writer falls behind, with an increasing age on the saved-log position. Still deciding which samples can be dropped.

21
YA
YasminBennett0702

Does closing the window leave a writer hanging around? That's the bit I'd try next, with the queue still full.

10
VI
VictorChen1142

It does. The window goes away but the process remains. I have another change to make before anyone else gets this version.

6

讨论已关闭

此讨论已连续六个月没有活动,现已关闭新回复。 最后活动: .