Files
zen/benchmark/fixtures/graphs/expression-table-map.json
stefan-gorules a4cafd0346 chore: add benchmarks (#459)
* chore: add benchmarks for tier 1 languages

* improve fixtures

* fix cargo fmt
2026-06-25 13:38:33 +02:00

1 line
2.0 KiB
JSON

{"contentType":"application/vnd.gorules.decision","nodes":[{"type":"inputNode","id":"in","name":"request","content":{"schema":""},"position":{"x":260,"y":120}},{"type":"expressionNode","id":"enrich","name":"enrich","content":{"expressions":[{"id":"enrich_e0","key":"subtotal","value":"amount * qty"},{"id":"enrich_e1","key":"premium","value":"amount > 40 and group == 'accessories'"}],"passThrough":true,"inputField":"items","outputPath":"enriched","executionMode":"loop"},"position":{"x":420,"y":120}},{"type":"decisionTableNode","id":"classify","name":"classify","content":{"hitPolicy":"first","inputs":[{"id":"ci","name":"Subtotal","field":"subtotal"}],"outputs":[{"id":"co","name":"Discount","field":"discount"}],"rules":[{"_id":"r1","ci":"> 1000","co":"15"},{"_id":"r2","ci":"> 500","co":"10"},{"_id":"r3","ci":"> 100","co":"5"},{"_id":"r4","ci":"","co":"0"}],"passThrough":true,"inputField":"enriched","outputPath":"classified","executionMode":"loop"},"position":{"x":580,"y":120}},{"type":"expressionNode","id":"replicate","name":"replicate","content":{"expressions":[{"id":"replicate_e0","key":"allItems","value":"items"},{"id":"replicate_e1","key":"enrichedCopy","value":"enriched"},{"id":"replicate_e2","key":"classifiedCopy","value":"classified"}],"passThrough":true,"inputField":null,"outputPath":null,"executionMode":"single"},"position":{"x":740,"y":120}},{"type":"expressionNode","id":"totals","name":"totals","content":{"expressions":[{"id":"totals_e0","key":"grandTotal","value":"sum(map(enriched, #.subtotal))"},{"id":"totals_e1","key":"itemCount","value":"len(items)"},{"id":"totals_e2","key":"premiumCount","value":"len(filter(enriched, #.premium))"}],"passThrough":true,"inputField":null,"outputPath":null,"executionMode":"single"},"position":{"x":900,"y":120}}],"edges":[{"id":"edge0","type":"edge","sourceId":"in","targetId":"enrich"},{"id":"edge1","type":"edge","sourceId":"enrich","targetId":"classify"},{"id":"edge2","type":"edge","sourceId":"classify","targetId":"replicate"},{"id":"edge3","type":"edge","sourceId":"replicate","targetId":"totals"}]}