Skip to content

thor: include startup stats in auditThorSystemEvent("Startup") and co-locate with recordGlobalMetrics#21154

Draft
Copilot wants to merge 2 commits intocandidate-10.2.xfrom
copilot/update-audit-thor-system-event
Draft

thor: include startup stats in auditThorSystemEvent("Startup") and co-locate with recordGlobalMetrics#21154
Copilot wants to merge 2 commits intocandidate-10.2.xfrom
copilot/update-audit-thor-system-event

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

auditThorSystemEvent("Startup") was called before startup metrics were computed, so the audit log captured no timing or cost data. The recordGlobalMetrics call with those stats was placed separately after.

Changes

  • thgraphmanager.cpp: Refactored auditThorSystemEventBuilder to accept optional std::initializer_list<StatisticKind> / std::initializer_list<stat_type> params, formatting each stat as name=value via queryStatisticName + formatStatistic. Existing 3-arg overload delegates to this. Added matching auditThorSystemEvent public overload.

  • thgraphmanager.hpp: Declared the new overload; added #include "jstats.h" and #include <initializer_list>.

  • thmastermain.cpp: Moved auditThorSystemEvent("Startup") and auditStartLogged = true to immediately after recordGlobalMetrics, passing the same startup stats:

recordGlobalMetrics("Queue", { {"component", "thor"}, {"name", thorName} },
    { StNumStarts, StTimeProvision, StTimeStart, StCostStart },
    { 1ULL, workerProvisionTimeNs, startupElapsedTimeNs, costStart });
auditThorSystemEvent("Startup",
    { StNumStarts, StTimeProvision, StTimeStart, StCostStart },
    { 1ULL, workerProvisionTimeNs, startupElapsedTimeNs, costStart });
auditStartLogged = true;

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

…o recordGlobalMetrics

Co-authored-by: jakesmith <902700+jakesmith@users.noreply.github.com>
Agent-Logs-Url: https://github.com/hpcc-systems/HPCC-Platform/sessions/617fd6b8-d9ea-4e0a-ac6e-9e9b807c9718
Copilot AI changed the title [WIP] Update auditThorSystemEvent to include additional args and reorder calls thor: include startup stats in auditThorSystemEvent("Startup") and co-locate with recordGlobalMetrics Mar 26, 2026
Copilot AI requested a review from jakesmith March 26, 2026 13: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.

2 participants