-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * Update trace logs * Release v0.9.2 (#176) * implement planPool * start implementation of tracing * implement IAlicaTrace and IAlicaTraceFactory, add tracing for behaviours init/terminate * replace tracecontext with string, change methods to pure virtual * add getter for traceFactory * replace getter for traceContext with getter for trace * use setLog for init/terminate traces, use factory to create traces * remove amr_interfaces dependency * add default constructor, make create pure virtual * return ptr to traceFactory * return ptr to traceFactory * add trace tag for run methods, check if trace / tracefactory exists before usage * add name to basicPlan, use name for tag * remove member variable and constructors * destroy traces after setting terminate tag * add comment to getTraceFactory method * use setLog, log run once, make getTrace() protected * Fixes in creating traces - Create traces in the execution context during init. - Provide the option to enable/disable tracing * Check if trace factory is setting before using it * Set basicplan name * Bug fixes - check if basic plan exists before accessing the trace context - if no parent is found create a root trace - remove hack to create basic plan * Fix alica engine termination Do the following in order to correctly terminate the engine: 1. Stop the plan base thread. This prevents any more changes to the running plan. 2. Deactivate the running plan in plan base stop(). This ensures the plans/behaviours are scheduled for termination in the correct order. 3. Stop all behaviours & plans that may be running. There should not be any since (2) ensures this taken care of 4. Execute all pending non repeatable jobs in the scheduler thread. This ensures the plan/behaviour init/terminates are actually executed. 5. Stop the scheduler thread Add a trace log that indicates if the trace is for a behaviour or a plan. Note: the master plan trace is not reported because the master plan does not have a corresponding basic plan attached to it. This is a bug & the reason for it is because there is no ConfAbstractPlanWrapper for the master plan due to which it is not in the plan pool. This has to be fixed in a separate PR. * Bring back scheduler null check in engine terminate * Avoid unused variable warning * Create BasicPlan object for the master plan There is no ConfAbstractPlanWrapper corresponding to the master plan. Therefore get the master plan details by calling getPlans() on the PlanRepository which includes the master plan details. * Fix ci Co-authored-by: bjoernschroeder <[email protected]> * Revert "Merge branch 'rr-devel' into vsk_improve_tracing" This reverts commit deab530, reversing changes made to 29616d2. * Remove misleading comment * No need for optional when returning the trace * Reset the trace after terminate * Pass a const ptr to the trace context getter * Add ability to create root custom trace By making the context returned from custom tracing optional the app can choose to create a root trace in cases where no suitable context is available. This can happen when the environment changes before the trace context is retreived but after the behaviour/plan is scheduled to start * Use upper case for alica tag names * Add comments Co-authored-by: bjoernschroeder <[email protected]>
- Loading branch information
1 parent
470548d
commit 1084575
Showing
6 changed files
with
180 additions
and
90 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.