Task #17972
Check the trace data spec
Start date:
Due date:
29/02/2024
% Done:
100%
Estimated time:
Description
The trace data generated by doMatch()
is in a structure given in JSON and Go in the page https://github.com/remiges-tech/crux/wiki/Traversal-trace-structure
This page has been updated today. It needs to be checked to see if the structures are valid, if all data is being reported as expected, and if the Go data structure can be converted to the JSON by a simple marshalling (specially doubtful about the "pattern"
object in L2 trace).
Files
Related issues
Updated by Sachin Divekar about 1 year ago
- In
TraceDataRule_t
,res
could be enum instead of string. Updated the wiki to add it:
type ResCode_t int const ( Match ResCode_t = iota // "+" Mismatch // "-" ThenCall // "+c" ElseCall // "-c" Return // "<" Exit // "<<" )
- Created ActionSet_t as a separate type to be used for actionset field in TraceDataRuleL2_t instead of anonymous struct:
type ActionSet_t struct { Tasks []string Properties map[string]string } type TraceDataRuleL2_t struct { pattern []TraceDataRuleL2Pattern_t tasks []string properties map[string]string nextset int actionset ActionSet_t }
- In TraceDataRuleL2_t updated properties to be slice of map:
properties []map[string]string
Updated by Sachin Divekar about 1 year ago
I have tested JSON marshalling by writing a sample Go program that declares these data structures, creates an instance of trace and then marshals it. It is working fine. Attaching the program and the output.
Updated by Sachin Divekar about 1 year ago
- % Done changed from 0 to 100
- Status changed from In Progress to Closed