Repository navigation
fix: System Report's problem list counts the whole week, and each report goes by its own read of the log - #2946
Merged
Conversation
…ort goes by its own read of the log - EventLogService.TallyAsync counts every record of the asked severities in a window, grouped by source and event ID, and reads no message. The report read the 500 newest critical and error events and stopped, so one noisy source used them up in a day or two, an older critical event was never read, and a count stopped at 500. Formatting the message was the slow part of a record, and a count needs only the source, ID, level and time. - It reads 256 records per hop to the thread pool and checks the cancel between them. A fault ends it as Unavailable with no groups, as the Logs tab's read ends, so a read cut short is never listed as the whole week. - The outcome comes back with the groups. System Report and About make their reports through one SystemReportService, and its read of LastOutcome could be the other report's. - SummarizeProblems takes the groups. The report still carries no event message, and a test pins that neither record the count builds has one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
System Report's "System log problems (last 7 days)" read the 500 newest critical and error events of the week and
stopped. One noisy source can log 500 errors in a day or two, so a critical event from earlier in the week, an
unexpected shutdown for one, was never read, and the noisy one read "500 times" whatever its real count. And the
report learned how its read went from
LastOutcomeon anEventLogServicethat System Report and About sharethrough one
SystemReportService, so one report's read could reset or set the other's result.What changed
EventLogService.TallyAsynccounts every record of the asked severities in the window, grouped by source and eventID, and reads no message: formatting the message is the slow part of a record, and a count needs only the source,
ID, level and time. On my PC, counting a week of the System log took 0.32 to 0.40 seconds over three runs, against
the report's 15-second budget.
Unavailablewith no groups, as the Logs tab's read ends, so a read cut short is never listed as the whole week.LastOutcome.SummarizeProblemstakes the groups. The report still carries no event message ([Bug]: About / System Report — the exported report carries the machine's MAC address and local IP, undisclosed, in all three formats #2352); a test pins that neitherrecord the count builds has one.
EventLogService,SystemReportService).Tests
Unavailable; a cancel throws within one batch, against a source long enough thatonly the cancel can end it.
TallyAsyncon a missing log returnsLogNotFoundand leavesLastOutcomeatOk.Each test failed against the defect it pins: with the count stopped at 500 (the 600-error, batch-boundary and cancel
tests), with every severity counted, a group critical only by its last record, the first record taken as the newest,
a fault returning what was counted, the cancel ignored, the outcome written to
LastOutcome, and a full batch takenas the end of the log.
Closes #2827.