mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-19 02:59:04 +02:00
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
926 B
926 B
scheduled_task collector
Scrape time is spent waiting on the Task Scheduler service, not on CPU.
IRegisteredTaskNameandPathare answered locally from the enumerated collection.State,Enabled,LastTaskResultandNumberOfMissedRunseach make a separate RPC to the Schedule service (roughly 0.1–0.3 ms per call).ITaskFolder::GetTasksandGetFoldersadd one RPC per folder each.- Read only the properties that are published, apply the include/exclude filter to the path before any service read, and keep property reads conditional on whether the metric that uses them is emitted.
- The fake native task in
scheduled_task_native_test.gocounts reads per vtable slot; extend those assertions when adding a property read. - To find slow calls, time each call type over a full enumeration on a live
system. Run it as
SYSTEMas well as a user: unprivileged accounts see fewer tasks.