Project

General

Profile

Task #17972

Check the trace data spec

Added by Shuvam Misra about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
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

out.json (2.59 KB) out.json Sachin Divekar, 27/02/2024 09:59 PM
main.go (3.03 KB) main.go Sachin Divekar, 27/02/2024 09:59 PM

Related issues

Precedes Crux: BRE/WFE - Task #17951: doMatch() tracing: Level 1Testing01/03/202412/04/2024Aniket Shinde

Actions
Precedes Crux: BRE/WFE - Task #17952: doMatch() tracing: Level 2Testing01/03/202401/03/2024Aniket Shinde

Actions
#1

Updated by Shuvam Misra about 1 year ago

  • Precedes Task #17951: doMatch() tracing: Level 1 added
#2

Updated by Shuvam Misra about 1 year ago

  • Precedes Task #17952: doMatch() tracing: Level 2 added
#4

Updated by Sachin Divekar about 1 year ago

  • Status changed from New to In Progress
#5

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
#6

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.

#7

Updated by Sachin Divekar about 1 year ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF